google-nomulus/javatests/google/registry/proxy/handler
jianglai 1013e047b4 Make SSL failure test more robust
A recent change in Netty 4.1.21 (978a46cc0a) tried to fix an issue where channels might be closed before any handshake exception can be propagated. This however introduced a regression where the the connection is not closed at all after a handshake failure, which caused test failures because we were expecting the connection to be closed after a handshake failure.

We rolled back dependency on Netty 4.1.21 so that the test would pass. A fix upstream is schedule for 4.1.22 (https://github.com/netty/netty/pull/7727).

However this does reveal some potential problem in our tests. Namely we did not wait for the connection to be closed before assertion on it. The old Netty behavior closes the connection before handshake exception is thrown, and we *do* wait for the handshake exception. The connection assertion happens after the handshake exception is verified, so by then the connection is always closed.

When the upstream fix is released, we'd run into concurrency problem described above. So we instead wait for the connection to be closed before checking handshake exception (by releasing the lock in a channel close listener), which guarantees that when we check the connection, it is always closed.

Also fixes some javadoc errors.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186021997
2018-02-20 15:59:06 -05:00
..
BackendMetricsHandlerTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
EppQuotaHandlerTest.java Register quota metrics in GCP proxy 2018-02-20 15:39:15 -05:00
EppServiceHandlerTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
HealthCheckHandlerTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
ProxyProtocolHandlerTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
RelayHandlerTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
SslClientInitializerTest.java Temporarily disable channel alive assertions in SSL fai... 2018-02-20 15:52:47 -05:00
SslInitializerTestUtils.java Make SSL failure test more robust 2018-02-20 15:59:06 -05:00
SslServerInitializerTest.java Temporarily disable channel alive assertions in SSL fai... 2018-02-20 15:52:47 -05:00
WhoisQuotaHandlerTest.java Register quota metrics in GCP proxy 2018-02-20 15:39:15 -05:00
WhoisServiceHandlerTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00