|
21 | 21 | import org.junit.After; |
22 | 22 | import org.junit.AfterClass; |
23 | 23 | import org.junit.Before; |
24 | | -import org.junit.Ignore; |
25 | 24 | import org.junit.Test; |
26 | 25 |
|
27 | 26 | import io.grpc.stub.StreamObserver; |
@@ -423,14 +422,13 @@ public void test_maxReconnectRetries() throws Exception { |
423 | 422 | } |
424 | 423 |
|
425 | 424 | out.hangup(); |
426 | | - |
| 425 | + |
427 | 426 | try { |
428 | | - this.closeContext(); |
429 | | - } |
430 | | - catch (Throwable t) { |
| 427 | + this.closeContext(); |
| 428 | + } catch (Throwable t) { |
431 | 429 | Assertions.assertThat(t) |
432 | | - .isInstanceOf(IOException.class) |
433 | | - .hasMessageContaining("Server unavailable"); |
| 430 | + .isInstanceOf(IOException.class) |
| 431 | + .hasMessageContaining("Server unavailable"); |
434 | 432 | } |
435 | 433 | } |
436 | 434 |
|
@@ -524,7 +522,7 @@ private static final class InboundStream implements StreamObserver<Message> { |
524 | 522 | */ |
525 | 523 | WeaviateProtoBatch.BatchStreamRequest expectMessage( |
526 | 524 | WeaviateProtoBatch.BatchStreamRequest.MessageCase messageCase) throws InterruptedException { |
527 | | - WeaviateProtoBatch.BatchStreamRequest actual = stream.poll(5, TimeUnit.SECONDS); |
| 525 | + WeaviateProtoBatch.BatchStreamRequest actual = stream.poll(10, TimeUnit.SECONDS); |
528 | 526 | Assertions.assertThat(actual) |
529 | 527 | .extracting(WeaviateProtoBatch.BatchStreamRequest::getMessageCase) |
530 | 528 | .isEqualTo(messageCase); |
@@ -556,7 +554,7 @@ public void onNext(Message message) { |
556 | 554 | WeaviateProtoBatch.BatchStreamRequest req = asRequest(message); |
557 | 555 | try { |
558 | 556 | 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); |
560 | 558 | assert accepted : "message %s delivered before %s was consumed".formatted( |
561 | 559 | req.getMessageCase(), stream.peek().getMessageCase()); |
562 | 560 | } catch (InterruptedException e) { |
|
0 commit comments