use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-bigquerystorage by googleapis.
the class BigQueryReadClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() {
mockBigQueryRead = new MockBigQueryRead();
serviceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockBigQueryRead));
serviceHelper.start();
}
use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-bigquerystorage by googleapis.
the class JsonStreamWriterTest method setUp.
@Before
public void setUp() throws Exception {
testBigQueryWrite = new FakeBigQueryWrite();
serviceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(testBigQueryWrite));
serviceHelper.start();
channelProvider = serviceHelper.createChannelProvider();
fakeExecutor = new FakeScheduledExecutorService();
testBigQueryWrite.setExecutor(fakeExecutor);
Instant time = Instant.now();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(time.getEpochSecond()).setNanos(time.getNano()).build();
// Add enough GetWriteStream response.
for (int i = 0; i < 4; i++) {
testBigQueryWrite.addResponse(WriteStream.newBuilder().setName(TEST_STREAM).setCreateTime(timestamp).build());
}
}
use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-bigquerystorage by googleapis.
the class BigQueryWriteClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() {
mockBigQueryWrite = new MockBigQueryWrite();
mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockBigQueryWrite));
mockServiceHelper.start();
}
use of com.google.api.gax.grpc.testing.MockServiceHelper in project beam by apache.
the class SpannerChangeStreamErrorTest method setUp.
@Before
public void setUp() throws Exception {
mockSpannerService = new MockSpannerServiceImpl();
serviceHelper = new MockServiceHelper(SPANNER_HOST, Collections.singletonList(mockSpannerService));
serviceHelper.start();
serviceHelper.reset();
}
use of com.google.api.gax.grpc.testing.MockServiceHelper in project java-datastream by googleapis.
the class DatastreamClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() {
mockDatastream = new MockDatastream();
mockLocations = new MockLocations();
mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockDatastream, mockLocations));
mockServiceHelper.start();
}
Aggregations