OpenSearch/modules
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
..
aggs-matrix-stats Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
analysis-common [Remove] Analyzer Deprecations (#1741) 2021-12-16 12:51:49 -06:00
geo [License] Add SPDX and OpenSearch Modification license header (#509) 2021-04-09 14:28:18 -05:00
ingest-common Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
ingest-geoip Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
ingest-user-agent Avoid logging duplicate deprecation warnings multiple times (#1660) 2021-12-15 15:26:44 -08:00
lang-expression Upgrade to Lucene 8.10.1 (#1440) 2021-10-28 10:06:53 -05:00
lang-mustache Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
lang-painless Avoid logging duplicate deprecation warnings multiple times (#1660) 2021-12-15 15:26:44 -08:00
mapper-extras Renaming slave to replica in filebeat-6.0.template.json file. (#1569) 2021-11-22 17:59:56 -05:00
opensearch-dashboards [License] Add SPDX and OpenSearch Modification license header (#509) 2021-04-09 14:28:18 -05:00
parent-join Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
percolator Remove LegacyESVersion.V_6_1_x constants (#1681) 2021-12-08 23:11:36 -06:00
rank-eval Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
reindex Adding a cancelled field to tell if a cancellable task is cancelled (#1732) 2021-12-16 09:49:49 -05:00
repository-url Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
systemd Run spotless and exclude checkstyle on modules module (#1442) 2021-10-27 13:24:43 -07:00
transport-netty4 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