use of com.google.api.gax.grpc.testing.MockGrpcService in project java-asset by googleapis.
the class AssetServiceClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() {
mockAssetService = new MockAssetService();
mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockAssetService));
mockServiceHelper.start();
}
use of com.google.api.gax.grpc.testing.MockGrpcService 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.MockGrpcService in project java-bigquerystorage by googleapis.
the class BaseBigQueryReadClientTest method startStaticServer.
@BeforeClass
public static void startStaticServer() {
mockBigQueryRead = new MockBigQueryRead();
mockServiceHelper = new MockServiceHelper(UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockBigQueryRead));
mockServiceHelper.start();
}
use of com.google.api.gax.grpc.testing.MockGrpcService 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.MockGrpcService 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());
}
}
Aggregations