From b88c58af1117ededfdc307b75c1f0c456516e65b Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Thu, 30 Jun 2022 10:02:14 -0400 Subject: [PATCH] fix: fix flaky test (#1293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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://github.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) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). --- .../bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java index 9294033f26..133f06767a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -331,7 +331,7 @@ public void testMutateRowAttempts() { // calls releaseWaiters(). onOperationComplete() is called in TracerFinisher which will be // called after the mutateRow call is returned. So there's a race between when the call returns // and when the record() is called in onOperationCompletion(). - verify(statsRecorderWrapper, timeout(20).times(fakeService.getAttemptCounter().get() + 1)) + verify(statsRecorderWrapper, timeout(50).times(fakeService.getAttemptCounter().get() + 1)) .record(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); assertThat(zone.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED); assertThat(cluster.getAllValues()).containsExactly(UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED);