Fix race-condition in SocketSslEchoTest
Motivation: Because we tried to grab the SSL renegotation future to early we could see test-failures. Modifications: Access the future at the correct time. Result: No more test-failures.
This commit is contained in:
parent
9f6e06dc43
commit
93f08aa28b
@ -304,14 +304,6 @@ public class SocketSslEchoTest extends AbstractSocketTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait until renegotiation is done.
|
|
||||||
if (renegoFuture != null) {
|
|
||||||
renegoFuture.sync();
|
|
||||||
}
|
|
||||||
if (serverHandler.renegoFuture != null) {
|
|
||||||
serverHandler.renegoFuture.sync();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure all data has been exchanged.
|
// Ensure all data has been exchanged.
|
||||||
while (clientRecvCounter.get() < data.length) {
|
while (clientRecvCounter.get() < data.length) {
|
||||||
if (serverException.get() != null) {
|
if (serverException.get() != null) {
|
||||||
@ -343,6 +335,14 @@ public class SocketSslEchoTest extends AbstractSocketTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait until renegotiation is done.
|
||||||
|
if (renegoFuture != null) {
|
||||||
|
renegoFuture.sync();
|
||||||
|
}
|
||||||
|
if (serverHandler.renegoFuture != null) {
|
||||||
|
serverHandler.renegoFuture.sync();
|
||||||
|
}
|
||||||
|
|
||||||
serverChannel.close().awaitUninterruptibly();
|
serverChannel.close().awaitUninterruptibly();
|
||||||
clientChannel.close().awaitUninterruptibly();
|
clientChannel.close().awaitUninterruptibly();
|
||||||
sc.close().awaitUninterruptibly();
|
sc.close().awaitUninterruptibly();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user