OpenSearch/plugins
Andrew Ross 96d55966a2
Use try-with-resources with MockLogAppender (#1595)
I previously added a helper that started a MockLogAppender to ensure it
was never added to a Logger before it was started. I subsequently found
the opposite case in RolloverIT.java where the appender was stopped
before it was closed, therefore creating a race where a concurrently
running test in the same JVM could cause a logging failure. This seems
like a really easy mistake to make when writing a test or introduce when
refactoring a test. I've made a change to use try-with-resources to
ensure that proper setup and teardown is done. This should make it much
harder to introduce this particular test bug in the future.
Unfortunately, it did involve touching a lot of files. The changes here
are purely structural to leverage try-with-resources; no testing logic
has been changed.

Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-12-21 15:00:55 -06:00
..
analysis-icu [Remove] Analyzer Deprecations (#1741) 2021-12-16 12:51:49 -06:00
analysis-kuromoji Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
analysis-nori Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
analysis-phonetic [Remove] Analyzer Deprecations (#1741) 2021-12-16 12:51:49 -06:00
analysis-smartcn Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
analysis-stempel Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
analysis-ukrainian Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
discovery-azure-classic Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
discovery-ec2 Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
discovery-gce Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
examples remove codeQL warning about implicit narrowing conversion in compound assignment (#1403) 2021-11-02 13:49:25 -07:00
ingest-attachment Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
mapper-annotated-text Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
mapper-murmur3 Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
mapper-size Enabling spotless, disabling checkstyle check on plugins (#1488) 2021-11-01 17:40:06 -07:00
repository-azure [plugin] repository-azure is not working properly hangs on basic operations (#1740) (#1749) 2021-12-16 15:10:52 -06:00
repository-gcs Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
repository-hdfs Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
repository-s3 Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
store-smb Remove Deprecated SimpleFS (#1639) 2021-12-03 09:57:59 -06:00
transport-nio Use try-with-resources with MockLogAppender (#1595) 2021-12-21 15:00:55 -06:00
build.gradle [License] Add SPDX and OpenSearch Modification license header (#509) 2021-04-09 14:28:18 -05:00