Skip to content

Commit 8ed8dae

Browse files
committed
Remove accidental change to testproxy build and deflake tests
Change-Id: Iea243f2c89872f947b5b79e37fa507e403f5acea
1 parent c2b25ef commit 8ed8dae

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImplTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public void testBackgroundRefresh() throws InterruptedException, ExecutionExcept
140140
do {
141141
Thread.sleep(10);
142142
} while (service.prepareCount < 2);
143+
Thread.sleep(50);
143144
PreparedQueryData updatedPlan = preparedStatement.getLatestPrepareResponse();
144145
PrepareResponse updatedResponse = updatedPlan.prepareFuture().get();
145146
assertThat(updatedPlan.version()).isNotEqualTo(initialPlan.version());

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryRetryTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ public void planRefreshRespectsAttemptTimeout() throws IOException {
548548
// First attempt triggers plan refresh retry.
549549
// Second should time out
550550
.setMaxAttempts(2)
551-
.setInitialRpcTimeoutDuration(Duration.ofMillis(10))
552-
.setMaxRpcTimeoutDuration(Duration.ofMinutes(10))
551+
.setInitialRpcTimeoutDuration(Duration.ofMillis(500))
552+
.setMaxRpcTimeoutDuration(Duration.ofMinutes(500))
553553
.setTotalTimeoutDuration(Duration.ZERO)
554554
.build())
555555
.build();
@@ -699,9 +699,9 @@ public void canRetryAfterRefreshAttemptTimeout() throws IOException {
699699
// First attempt triggers plan refresh retry.
700700
// Second should time out, third should succeed
701701
.setMaxAttempts(3)
702-
.setInitialRpcTimeoutDuration(Duration.ofMillis(100))
703-
.setMaxRpcTimeoutDuration(Duration.ofMillis(100))
704-
.setTotalTimeoutDuration(Duration.ofMinutes(500))
702+
.setInitialRpcTimeoutDuration(Duration.ofSeconds(1))
703+
.setMaxRpcTimeoutDuration(Duration.ofSeconds(1))
704+
.setTotalTimeoutDuration(Duration.ofSeconds(5))
705705
.build())
706706
.build();
707707
settings.stubSettings().build();
@@ -724,7 +724,7 @@ public void canRetryAfterRefreshAttemptTimeout() throws IOException {
724724
PrepareRpcExpectation.create()
725725
.withSql("SELECT * FROM table")
726726
// first refresh attempt times out, but then it succeeds
727-
.withDelay(Duration.ofMillis(150))
727+
.withDelay(Duration.ofMillis(1500))
728728
.respondWith(
729729
prepareResponse(
730730
ByteString.copyFromUtf8("bar"),
@@ -756,9 +756,9 @@ public void prepareRefreshTimeIsFactoredIntoExecuteAttemptTimeout() throws IOExc
756756
// First attempt triggers plan refresh retry.
757757
// Second should time out, third should succeed
758758
.setMaxAttempts(2)
759-
.setInitialRpcTimeoutDuration(Duration.ofMillis(30))
760-
.setMaxRpcTimeoutDuration(Duration.ofMillis(30))
761-
.setTotalTimeoutDuration(Duration.ofMinutes(30))
759+
.setInitialRpcTimeoutDuration(Duration.ofMillis(500))
760+
.setMaxRpcTimeoutDuration(Duration.ofMillis(500))
761+
.setTotalTimeoutDuration(Duration.ofMinutes(500))
762762
.build())
763763
.build();
764764
settings.stubSettings().build();
@@ -779,16 +779,16 @@ public void prepareRefreshTimeIsFactoredIntoExecuteAttemptTimeout() throws IOExc
779779
PrepareRpcExpectation.create()
780780
.withSql("SELECT * FROM table")
781781
// Burn most of the execute attempt timeout and succeed
782-
.withDelay(Duration.ofMillis(20))
782+
.withDelay(Duration.ofMillis(350))
783783
.respondWith(
784784
prepareResponse(
785785
ByteString.copyFromUtf8("bar"),
786786
metadata(columnMetadata("strCol", stringType())))));
787787
service.addExpectation(
788788
ExecuteRpcExpectation.create()
789789
.withPreparedQuery(ByteString.copyFromUtf8("bar"))
790-
// Should timeout bc we used 20 ms on prepare refresh and have 30ms timeout
791-
.withDelay(Duration.ofMillis(20))
790+
// Should timeout bc we used 350 ms on prepare refresh and have 500ms timeout
791+
.withDelay(Duration.ofMillis(350))
792792
.respondWith(partialResultSetWithToken(stringValue("s"))));
793793

794794
PreparedStatement ps =

test-proxy/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
<artifactId>protobuf-maven-plugin</artifactId>
7272
<version>0.6.1</version>
7373
<configuration>
74-
<protocArtifact>com.google.protobuf:protoc:3.22.3:exe:osx-x86_64</protocArtifact>
74+
<protocArtifact>com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}</protocArtifact>
7575
<pluginId>grpc-java</pluginId>
76-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.24.0:exe:osx-x86_64</pluginArtifact>
76+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.24.0:exe:${os.detected.classifier}</pluginArtifact>
7777
</configuration>
7878
<executions>
7979
<execution>

0 commit comments

Comments
 (0)