@@ -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 =
0 commit comments