Skip to content

Commit d155387

Browse files
committed
[Test] More accurate pattern matching for testWatchdogLogging
There might be other thread temporarily not making progress and reported by the watchdog. This PR tightens up the pattern matching for the expected thread name. Resolves: #128646
1 parent 1ab2e6c commit d155387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3354,7 +3354,7 @@ public void testWatchdogLogging() {
33543354
MockLog.assertThatLogger(
33553355
deterministicTaskQueue::runAllRunnableTasks,
33563356
ThreadWatchdog.class,
3357-
new MockLog.UnseenEventExpectation("no logging", ThreadWatchdog.class.getCanonicalName(), Level.WARN, "*")
3357+
new MockLog.UnseenEventExpectation("no logging", ThreadWatchdog.class.getCanonicalName(), Level.WARN, "*" + threadName + "*")
33583358
);
33593359
deterministicTaskQueue.advanceTime();
33603360
MockLog.assertThatLogger(

0 commit comments

Comments
 (0)