Skip to content

Commit f5b0987

Browse files
Fix testTracerLog Network Tests
* Start appender before using it like we do for e.g. the Netty leak detection appender to avoid interference from actions on the network threads that might still be dangling from previous tests in the same suite * Closes elastic#41890
1 parent e27035a commit f5b0987

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1047,10 +1047,9 @@ public String executor() {
10471047
.build());
10481048

10491049
MockLogAppender appender = new MockLogAppender();
1050+
appender.start();
10501051
Loggers.addAppender(LogManager.getLogger("org.elasticsearch.transport.TransportService.tracer"), appender);
10511052
try {
1052-
appender.start();
1053-
10541053
final String requestSent = ".*\\[internal:test].*sent to.*\\{TS_B}.*";
10551054
final MockLogAppender.LoggingExpectation requestSentExpectation =
10561055
new MockLogAppender.PatternSeenEventExpectation(

0 commit comments

Comments
 (0)