File tree Expand file tree Collapse file tree
sdk-platform-java/gax-java
gax/src/test/java/com/google/api/gax/batching Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments