summaryrefslogtreecommitdiffstats
path: root/vespa-http-client/src/test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-10-17 22:53:19 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2018-10-17 22:53:19 +0200
commite25493a26039af0d4a42743fc16f0fc1902fb65e (patch)
tree25b76c3bfc5084bf1fdeba0e532696a54807835f /vespa-http-client/src/test
parent12a5fcc9b1f923db643e1e7c807d805eab72a752 (diff)
Add a parameter that will make the Q unbounded if producer == consumer.
The purpose is to avoid deadlocking with yourself.
Diffstat (limited to 'vespa-http-client/src/test')
-rw-r--r--vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/CloseableQTestCase.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/CloseableQTestCase.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/CloseableQTestCase.java
index 13129dba326..4148e652d55 100644
--- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/CloseableQTestCase.java
+++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/CloseableQTestCase.java
@@ -10,7 +10,7 @@ public class CloseableQTestCase {
@Test
public void requestThatPutIsInterruptedOnClose() throws InterruptedException {
final DocumentQueue q = new DocumentQueue(1);
- q.put(new Document("id", "data", null /* context */));
+ q.put(new Document("id", "data", null /* context */), false);
Thread t = new Thread(new Runnable() {
@Override
public void run() {
@@ -25,7 +25,7 @@ public class CloseableQTestCase {
});
t.start();
try {
- q.put(new Document("id2", "data2", null /* context */));
+ q.put(new Document("id2", "data2", null /* context */), false);
fail("This shouldn't have worked.");
} catch (IllegalStateException ise) {
// ok!