Skip to content

Commit bae251b

Browse files
committed
Fixing Flaky ReactorNetty4StreamingStressIT test case (another attempt)
Signed-off-by: Andriy Redko <drreta@gmail.com>
1 parent 99ac67e commit bae251b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

plugins/transport-reactor-netty4/src/javaRestTest/java/org/opensearch/rest/ReactorNetty4StreamingStressIT.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.opensearch.client.Response;
1414
import org.opensearch.client.StreamingRequest;
1515
import org.opensearch.client.StreamingResponse;
16+
import org.opensearch.common.settings.Settings;
1617
import org.opensearch.test.rest.OpenSearchRestTestCase;
1718
import org.junit.After;
1819

@@ -44,7 +45,11 @@ public void tearDown() throws Exception {
4445
super.tearDown();
4546
}
4647

47-
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/15840")
48+
@Override
49+
protected Settings restClientSettings() {
50+
return Settings.builder().put(super.restClientSettings()).put(CLIENT_SOCKET_TIMEOUT, "5s").build();
51+
}
52+
4853
public void testCloseClientStreamingRequest() throws Exception {
4954
final VirtualTimeScheduler scheduler = VirtualTimeScheduler.create(true);
5055

@@ -77,7 +82,9 @@ public void testCloseClientStreamingRequest() throws Exception {
7782
}
7883
})
7984
.then(() -> scheduler.advanceTimeBy(delay))
80-
.expectErrorMatches(t -> t instanceof InterruptedIOException || t instanceof ConnectionClosedException)
85+
.expectErrorMatches(
86+
t -> t instanceof InterruptedIOException || t instanceof ConnectionClosedException || t instanceof UncheckedIOException
87+
)
8188
.verify(Duration.ofSeconds(10));
8289
}
8390
}

0 commit comments

Comments
 (0)