OpenSearch/test
Andrew Ross d467283475
Start MockLogAppender before adding to static context (#1587)
I observed a test failure with the message
'Attempted to append to non-started appender mock' from an assertion in
`OpenSearchTestCase::after`. I believe this indicates that a
MockLogAppender (which is named "mock") was added as an appender to the
static logging context and some other test in the same JVM happened to
cause a logging statement to hit that appender and cause an error, which
then caused an unrelated test to fail (because they share static state
with the logger). Almost all usages of MockLogAppender start it
immediately after creation. I found a few that did not and fixed those.
I also made a static helper in MockLogAppender to start it upon
creation.

Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-11-19 13:37:46 -05:00
..
external-modules [License] Add SPDX and OpenSearch Modification license header (#509) 2021-04-09 14:28:18 -05:00
fixtures Upgrading gson to 2.8.9 (#1541) 2021-11-15 14:10:29 -05:00
framework Start MockLogAppender before adding to static context (#1587) 2021-11-19 13:37:46 -05:00
logger-usage [License] Add SPDX and OpenSearch Modification license header (#509) 2021-04-09 14:28:18 -05:00
build.gradle [License] Add SPDX and OpenSearch Modification license header (#509) 2021-04-09 14:28:18 -05:00