use of com.google.cloud.bigtable.data.v2.FakeServiceHelper in project java-bigtable by googleapis.
the class StatsHeadersCallableTest method setUp.
@Before
public void setUp() throws Exception {
metadataInterceptor = new MetadataInterceptor();
serviceHelper = new FakeServiceHelper(metadataInterceptor, fakeService);
serviceHelper.start();
EnhancedBigtableStubSettings settings = BigtableDataSettings.newBuilderForEmulator(serviceHelper.getPort()).setProjectId(PROJECT_ID).setInstanceId(INSTANCE_ID).setAppProfileId(APP_PROFILE_ID).build().getStubSettings();
stub = EnhancedBigtableStub.create(settings);
}
use of com.google.cloud.bigtable.data.v2.FakeServiceHelper in project java-bigtable by googleapis.
the class EnhancedBigtableStubCloseRetryTest method setUp.
@Before
public void setUp() throws Exception {
testExecutor = Executors.newCachedThreadPool();
requests = new ArrayBlockingQueue<>(10);
numRequests = new AtomicInteger();
serviceHelper = new FakeServiceHelper(new FakeBigtable());
serviceHelper.start();
BigtableDataSettings.Builder settingBuilder = BigtableDataSettings.newBuilderForEmulator(serviceHelper.getPort()).setProjectId(PROJECT_ID).setInstanceId(INSTANCE_ID).setCredentialsProvider(NoCredentialsProvider.create()).setRefreshingChannel(false);
stub = EnhancedBigtableStub.create(settingBuilder.build().getStubSettings());
}
use of com.google.cloud.bigtable.data.v2.FakeServiceHelper in project java-bigtable by googleapis.
the class BigtableChannelPrimerTest method setup.
@Before
public void setup() throws IOException {
fakeService = new FakeService();
metadataInterceptor = new MetadataInterceptor();
serviceHelper = new FakeServiceHelper(metadataInterceptor, fakeService);
serviceHelper.start();
primer = BigtableChannelPrimer.create(OAuth2Credentials.create(new AccessToken(TOKEN_VALUE, null)), "fake-project", "fake-instance", "fake-app-profile", ImmutableList.of("table1", "table2"));
channel = ManagedChannelBuilder.forAddress("localhost", serviceHelper.getPort()).usePlaintext().build();
logHandler = new LogHandler();
Logger.getLogger(BigtableChannelPrimer.class.toString()).addHandler(logHandler);
}
Aggregations