Skip to content

Commit 06cd2e0

Browse files
committed
chore(deps): configure awaitility version locally in gax-java and increase test timeouts to 5s
1 parent 629f199 commit 06cd2e0

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/batching/ThresholdBatcherTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ void testBatching() throws Exception {
196196
batcher.add(SimpleBatch.fromInteger(3));
197197
batcher.add(SimpleBatch.fromInteger(5));
198198
// Give time for the executor to push the batch
199-
await().atMost(Duration.ofSeconds(1)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
199+
await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
200200

201201
batcher.add(SimpleBatch.fromInteger(7));
202202
batcher.add(SimpleBatch.fromInteger(9));
203203
// Give time for the executor to push the batch
204-
await().atMost(Duration.ofSeconds(1)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(2));
204+
await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(2));
205205

206206
batcher.add(SimpleBatch.fromInteger(11));
207207

@@ -228,7 +228,7 @@ void testBatchingWithDelay() throws Exception {
228228
batcher.add(SimpleBatch.fromInteger(3));
229229
batcher.add(SimpleBatch.fromInteger(5));
230230
// Give time for the delay to trigger and push the batch
231-
await().atMost(Duration.ofSeconds(1)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
231+
await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
232232

233233
batcher.add(SimpleBatch.fromInteger(11));
234234

sdk-platform-java/gax-java/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3737
<maven.compiler.source>1.8</maven.compiler.source>
3838
<maven.compiler.target>1.8</maven.compiler.target>
39+
<awaitility.version>4.3.0</awaitility.version>
3940
</properties>
4041

4142
<modules>

0 commit comments

Comments
 (0)