Skip to content

Commit

Permalink
Fixed test that was failing due to TLS 1.3 backport to Java 8.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Nov 17, 2020
1 parent 71087e5 commit 1d71cab
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -164,8 +164,15 @@ public void selected(String s)
encrypted.flip();
}
assertEquals(21, encrypted.get());
// TLS 1.3 may send 2 alerts: "user_canceled" followed by "close_notify".
encrypted.clear();
assertEquals(-1, channel.read(encrypted));
read = channel.read(encrypted);
if (read > 0)
{
encrypted.clear();
read = channel.read(encrypted);
}
assertEquals(-1, read);
}
}

Expand Down

0 comments on commit 1d71cab

Please sign in to comment.