Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 8, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
import com.google.cloud.bigtable.data.v2.models.sql.Statement;
import com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryCallable;
import com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStream;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Queues;
import com.google.common.io.BaseEncoding;
Expand Down Expand Up @@ -291,6 +292,28 @@ public void testFeatureFlags() throws InterruptedException, IOException, Executi
assertThat(featureFlags.getLastScannedRowResponses()).isTrue();
}

@Test
public void testPingAndWarmFeatureFlags()
throws InterruptedException, IOException, ExecutionException {
EnhancedBigtableStubSettings settings =
defaultSettings.toBuilder().setRefreshingChannel(true).build();
try (EnhancedBigtableStub ignored = EnhancedBigtableStub.create(settings)) {
Preconditions.checkState(
!fakeDataService.pingRequests.isEmpty(), "Ping request was not sent during setup");
Metadata metadata = metadataInterceptor.headers.take();

String encodedFeatureFlags =
metadata.get(Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER));
FeatureFlags featureFlags =
FeatureFlags.parseFrom(BaseEncoding.base64Url().decode(encodedFeatureFlags));

assertThat(featureFlags.getReverseScans()).isTrue();
assertThat(featureFlags.getLastScannedRowResponses()).isTrue();
Comment thread
igorbernstein2 marked this conversation as resolved.
assertThat(featureFlags.getRoutingCookie()).isTrue();
assertThat(featureFlags.getRetryInfo()).isTrue();
}
}

@Test
public void testCheckAndMutateRequestResponseConversion()
throws ExecutionException, InterruptedException {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.