Skip to content

Commit bc1d751

Browse files
authored
[Test] More accurate pattern matching for testWatchdogLogging (elastic#128648)
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: elastic#128646
1 parent 3443a6e commit bc1d751

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)