Skip to content

Commit 5a64acf

Browse files
committed
chore(deps): format Awaitility changes in ThresholdBatcherTest
1 parent e69f121 commit 5a64acf

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
package com.google.api.gax.batching;
3131

3232
import static com.google.common.truth.Truth.assertThat;
33+
import static org.awaitility.Awaitility.await;
3334
import static org.junit.jupiter.api.Assertions.assertEquals;
3435
import static org.junit.jupiter.api.Assertions.assertThrows;
3536
import static org.mockito.ArgumentMatchers.any;
3637
import static org.mockito.ArgumentMatchers.anyLong;
3738
import static org.mockito.ArgumentMatchers.eq;
3839
import static org.mockito.Mockito.mock;
3940
import static org.mockito.Mockito.times;
40-
import static org.awaitility.Awaitility.await;
4141
import static org.mockito.Mockito.verify;
4242
import static org.mockito.Mockito.when;
4343

@@ -196,12 +196,16 @@ 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(5)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
199+
await()
200+
.atMost(Duration.ofSeconds(5))
201+
.untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
200202

201203
batcher.add(SimpleBatch.fromInteger(7));
202204
batcher.add(SimpleBatch.fromInteger(9));
203205
// Give time for the executor to push the batch
204-
await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(2));
206+
await()
207+
.atMost(Duration.ofSeconds(5))
208+
.untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(2));
205209

206210
batcher.add(SimpleBatch.fromInteger(11));
207211

@@ -228,7 +232,9 @@ void testBatchingWithDelay() throws Exception {
228232
batcher.add(SimpleBatch.fromInteger(3));
229233
batcher.add(SimpleBatch.fromInteger(5));
230234
// Give time for the delay to trigger and push the batch
231-
await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
235+
await()
236+
.atMost(Duration.ofSeconds(5))
237+
.untilAsserted(() -> assertThat(receiver.getBatches()).hasSize(1));
232238

233239
batcher.add(SimpleBatch.fromInteger(11));
234240

0 commit comments

Comments
 (0)