Skip to content

Commit 85f8458

Browse files
committed
[ML] Add comment describing test behaviour
1 parent a2c22ad commit 85f8458

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

x-pack/plugin/ml/qa/no-bootstrap-tests/src/test/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelperNoBootstrapTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ public void testOpenForOutput() throws IOException, InterruptedException {
321321
OutputStream os = NAMED_PIPE_HELPER.openNamedPipeOutputStream(pipeName, Duration.ofSeconds(10));
322322
assertNotNull(os);
323323

324+
// In some rare cases writer can close before the reader has had a chance
325+
// to read what is written. On Windows this can cause ConnectNamedPipe to
326+
// error with ERROR_NO_DATA
324327
try (OutputStreamWriter writer = new OutputStreamWriter(os, StandardCharsets.UTF_8)) {
325328
writer.write(GOODBYE_WORLD);
326329
writer.write('\n');

0 commit comments

Comments
 (0)