Skip to content

Commit def925a

Browse files
committed
test(batch): increase timeout
1 parent 29c64d2 commit def925a

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/test/java/io/weaviate/client6/v1/api/collections/batch/BatchContextTest.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.junit.After;
2222
import org.junit.AfterClass;
2323
import org.junit.Before;
24-
import org.junit.Ignore;
2524
import org.junit.Test;
2625

2726
import io.grpc.stub.StreamObserver;
@@ -423,14 +422,13 @@ public void test_maxReconnectRetries() throws Exception {
423422
}
424423

425424
out.hangup();
426-
425+
427426
try {
428-
this.closeContext();
429-
}
430-
catch (Throwable t) {
427+
this.closeContext();
428+
} catch (Throwable t) {
431429
Assertions.assertThat(t)
432-
.isInstanceOf(IOException.class)
433-
.hasMessageContaining("Server unavailable");
430+
.isInstanceOf(IOException.class)
431+
.hasMessageContaining("Server unavailable");
434432
}
435433
}
436434

@@ -524,7 +522,7 @@ private static final class InboundStream implements StreamObserver<Message> {
524522
*/
525523
WeaviateProtoBatch.BatchStreamRequest expectMessage(
526524
WeaviateProtoBatch.BatchStreamRequest.MessageCase messageCase) throws InterruptedException {
527-
WeaviateProtoBatch.BatchStreamRequest actual = stream.poll(5, TimeUnit.SECONDS);
525+
WeaviateProtoBatch.BatchStreamRequest actual = stream.poll(10, TimeUnit.SECONDS);
528526
Assertions.assertThat(actual)
529527
.extracting(WeaviateProtoBatch.BatchStreamRequest::getMessageCase)
530528
.isEqualTo(messageCase);
@@ -556,7 +554,7 @@ public void onNext(Message message) {
556554
WeaviateProtoBatch.BatchStreamRequest req = asRequest(message);
557555
try {
558556
System.out.println("[Incoming message] " + req.getMessageCase());
559-
boolean accepted = stream.offer(req, 5, TimeUnit.SECONDS);
557+
boolean accepted = stream.offer(req, 10, TimeUnit.SECONDS);
560558
assert accepted : "message %s delivered before %s was consumed".formatted(
561559
req.getMessageCase(), stream.peek().getMessageCase());
562560
} catch (InterruptedException e) {

0 commit comments

Comments
 (0)