Skip to content

Commit 94d1ea0

Browse files
authored
test: update conformance settings (#2049)
In the conformance test, create the client with retryInfo and routing cookie disabled. Run all the tests except for the tests that specifically test the features, which are expected to fail because client is not handling them. Also create another client with both features enabled and expected the tests to succeed. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent a492d02 commit 94d1ea0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.kokoro/conformance.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ do
6060
configFlag="--enable_features_all"
6161
else
6262
echo "Testing the client with default settings for optional features..."
63-
configFlag=""
63+
# skipping routing cookie and retry info tests. When the feature is disabled, these
64+
# tests are expected to fail
65+
configFlag="-skip _Retry_WithRoutingCookie\|_Retry_WithRetryInfo"
6466
fi
6567

6668
pushd .

test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ public synchronized void createClient(
208208
.setInstanceId(request.getInstanceId())
209209
.setAppProfileId(request.getAppProfileId());
210210

211+
settingsBuilder.stubSettings().setEnableRoutingCookie(false);
212+
settingsBuilder.stubSettings().setEnableRetryInfo(false);
213+
211214
if (request.hasPerOperationTimeout()) {
212215
Duration newTimeout = Duration.ofMillis(Durations.toMillis(request.getPerOperationTimeout()));
213216
settingsBuilder = overrideTimeoutSetting(newTimeout, settingsBuilder);
@@ -231,6 +234,8 @@ public synchronized void createClient(
231234
}
232235
}
233236
settingsBuilder.stubSettings().bulkMutateRowsSettings().setServerInitiatedFlowControl(true);
237+
settingsBuilder.stubSettings().setEnableRoutingCookie(true);
238+
settingsBuilder.stubSettings().setEnableRetryInfo(true);
234239
}
235240

236241
// Create and store CbtClient for later use

0 commit comments

Comments
 (0)