aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-09-30 18:32:04 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-09-30 18:32:04 +0200
commit6792ae6918439c535ff518107ad17351bb27fed1 (patch)
treedac7b68cdc4bfddca03ae497919c4cc593264a80 /vespaclient-container-plugin
parentdc4f51621c0c965f97459c8c7f19aa3062d41567 (diff)
Await advance from test thread to next arrive is in the intended phase
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/DocumentOperationExecutorTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/DocumentOperationExecutorTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/DocumentOperationExecutorTest.java
index ea34091879b..1d2f6af35dd 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/DocumentOperationExecutorTest.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/DocumentOperationExecutorTest.java
@@ -208,7 +208,7 @@ public class DocumentOperationExecutorTest {
clock.advance(Duration.ofMillis(990));
executor.notifyMaintainers(); // Let doc1 time out.
- phaser.arrive(); // Let doc2 arrive.
+ phaser.arriveAndAwaitAdvance(); // Let doc2 arrive.
phaser.arriveAndAwaitAdvance(); // Wait for responses to be delivered.
assertEquals(List.of(TIMEOUT), errors);
assertEquals(List.of(doc2), received);
@@ -225,7 +225,7 @@ public class DocumentOperationExecutorTest {
session().setResultType(Result.ResultType.SUCCESS);
clock.advance(Duration.ofMillis(20));
executor.notifyMaintainers(); // Retry not attempted since operation already timed out.
- phaser.arrive();
+ phaser.arriveAndAwaitAdvance();
phaser.arriveAndAwaitAdvance();
assertEquals(List.of(TIMEOUT, TIMEOUT), errors);
assertEquals(List.of(doc2), received);