Class CloudTasksTestClients
java.lang.Object
io.github.flink.gcp.connector.testutils.cloudtasks.CloudTasksTestClients
- All Implemented Interfaces:
AutoCloseable
A stock
CloudTasksClient over one plaintext channel to the emulator, with no credentials,
for queue administration and task inspection.
Stock 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 — the same
property testutils.bigtable.BigtableTestClients exists to show.
The instance owns the channel: close() closes the client and shuts the channel down,
and a construction that fails half-way shuts it down too, so a caller's teardown only ever sees a
fully-constructed instance.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.tasks.v2.CloudTasksClientclient()voidclose()static CloudTasksTestClientsforEmulator(String endpoint) Opens a client against the emulator atendpoint(host:port).
-
Method Details
-
forEmulator
Opens a client against the emulator atendpoint(host:port).- Throws:
IOException
-
client
public com.google.cloud.tasks.v2.CloudTasksClient client() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-