[TEST] Ensure interrupted flag reset after test that sets it (#37230)
Test fix to stop a problem in one test leaking into a different test and causing that other test to spuriously fail.
This commit is contained in:
parent
224475e6aa
commit
f14cff2102
|
@ -72,6 +72,9 @@ public class TimeoutCheckerTests extends FileStructureTestCase {
|
|||
} finally {
|
||||
TimeoutChecker.watchdog.unregister();
|
||||
}
|
||||
} finally {
|
||||
// ensure the interrupted flag is cleared to stop it making subsequent tests fail
|
||||
Thread.interrupted();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,6 +92,9 @@ public class TimeoutCheckerTests extends FileStructureTestCase {
|
|||
assertEquals("Aborting grok captures test during [should timeout] as it has taken longer than the timeout of [" +
|
||||
timeout + "]", e.getMessage());
|
||||
});
|
||||
} finally {
|
||||
// ensure the interrupted flag is cleared to stop it making subsequent tests fail
|
||||
Thread.interrupted();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue