aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin/src/test
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-09-30 13:55:28 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-09-30 13:55:28 +0200
commit08016b3290700eb06e5c4c899a2d2e78ae746080 (patch)
tree23dbf21bda0722285545ede75c0dba781aac1aed /vespaclient-container-plugin/src/test
parentb1a0ce6e16ba38dc342e2f5b9544e0f0b6329f4d (diff)
Preserve user callbacks through DocumentOperationExecutorImpl
Diffstat (limited to 'vespaclient-container-plugin/src/test')
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/DocumentOperationExecutorTest.java10
1 files changed, 10 insertions, 0 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 b57a0478ec2..331ad18e63c 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
@@ -232,6 +232,16 @@ public class DocumentOperationExecutorTest {
}
@Test
+ public void testCallback() {
+ AtomicBoolean called = new AtomicBoolean();
+ executor.get(doc1.getId(), parameters().withResponseHandler(__ -> called.set(true)), operationContext());
+ assertTrue(called.get());
+ assertEquals(List.of(), messages);
+ assertEquals(List.of(), errors);
+ assertEquals(List.of(), received);
+ }
+
+ @Test
public void testVisit() throws InterruptedException {
executor.put(new DocumentPut(doc1), parameters(), operationContext());
executor.put(new DocumentPut(doc2), parameters(), operationContext());