google-nomulus/javatests/google/registry/flows
jianglai 5790f9743f Fix incorrect use of TestLogHandler that causes tests to be flaky
The following test failed repeatedly and consistently during testing of
[] - part of the work to upgrade mockito.
//third_party/java_src/gtld/javatests/google/registry/flows:EppControllerTest

The test failure was not caused by the mockito change, although it's possible
that the mockito change did change something that made it more likely to occur.
The failure was caused because the test added a TestLogHandler to a Logger in
order to intercept a LogRecord but did not maintain a strong reference to the
Logger. So sometimes it was GCed before the EppController class obtained its
own reference to it. That meant that the Logger that produced the LogRecord
was not the same as the Logger to which the TestLogHandler was attached and so
the LogRecord was never intercepted and the test failed.

This change keeps a strong reference and also removes the handler after the
test has finished.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171824566
2017-10-24 16:53:47 -04:00
..
async Add metrics for async batch operation processing 2017-06-05 18:17:09 -04:00
contact Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
custom Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
domain Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
host Add better testing of domain and host creation using multi-part TLDs 2017-08-29 15:47:50 -04:00
poll Fix typo in DomainTransferResponse.Builder method namename 2017-10-04 16:16:45 -04:00
session Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
testdata Add better testing of domain and host creation using multi-part TLDs 2017-08-29 15:47:50 -04:00
BUILD Allow EventSample.record to accept numSamples=0 2017-10-24 16:50:30 -04:00
CheckApiActionTest.java Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
EppCommitLogsTest.java Un-Ignore a test in DomainApplicationCreateFlowTest 2017-05-03 10:44:56 -04:00
EppConsoleActionTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EppControllerTest.java Fix incorrect use of TestLogHandler that causes tests to be flaky 2017-10-24 16:53:47 -04:00
EppLifecycleContactTest.java Record a version of EPP metrics with TLD for domain commands 2017-10-05 11:47:31 -04:00
EppLifecycleDomainApplicationTest.java Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
EppLifecycleDomainTest.java Record a version of EPP metrics with TLD for domain commands 2017-10-05 11:47:31 -04:00
EppLifecycleHostTest.java Add better testing of domain and host creation using multi-part TLDs 2017-08-29 15:47:50 -04:00
EppLifecycleLoginTest.java Add flow-level EPP metric tests 2017-05-03 10:51:12 -04:00
EppLoggedOutTest.java Finish YAMLification of last necessary config values 2017-02-03 12:37:38 -05:00
EppLoginAdminUserTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EppLoginTlsTest.java Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
EppLoginUserTest.java Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
EppTestCase.java Un-Ignore a test in DomainApplicationCreateFlowTest 2017-05-03 10:44:56 -04:00
EppTestComponent.java Swap all uses of Lock to LockHandler 2017-09-12 15:51:50 -04:00
EppTlsActionTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EppToolActionTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EppXmlTransformerTest.java Add and adjust EppInput accessors for more useful properties 2017-04-26 10:51:47 -04:00
EppXxeAttackTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ExtensionManagerTest.java Add support for a domain transfer request superuser EPP extension 2017-09-12 15:51:50 -04:00
FlowReporterTest.java Record a version of EPP metrics with TLD for domain commands 2017-10-05 11:47:31 -04:00
FlowRunnerTest.java Log EppExceptions in EppController at INFO (vs FlowRunner at WARNING) 2017-05-03 11:04:51 -04:00
FlowTestCase.java Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
ResourceCheckFlowTestCase.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ResourceFlowTestCase.java Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
TlsCredentialsTest.java Fix X-GFE header search bug 2017-08-29 16:57:47 -04:00