Class SpannerTestClients

java.lang.Object
io.github.flink.gcp.connector.testutils.spanner.SpannerTestClients

@Internal public final class SpannerTestClients extends Object
Stock Spanner clients pointed at an emulator endpoint.

Harness-owned and deliberately unshaded: in the SQL module's smoke test this runs beside the uber-jar's relocated copy, so that the two demonstrably coexist on one classpath.

  • Method Details

    • forEmulator

      public static com.google.cloud.spanner.Spanner forEmulator(String endpoint, String project)
      Opens a client against the emulator at endpoint (host:port).

      The returned service belongs to the caller and must be closed.

      Parameters:
      endpoint - the emulator endpoint
      project - the project that resources are addressed under
      Returns:
      the stock client