Skip to content

Commit

Permalink
Unmuted and fixed test.
Browse files Browse the repository at this point in the history
Multiple invocations are expected.

see #48519
  • Loading branch information
martijnvg committed Oct 28, 2019
1 parent 0394e74 commit 2b4aaab
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

public class MatcherWatchdogTests extends ESTestCase {

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/48519")
public void testInterrupt() throws Exception {
AtomicBoolean run = new AtomicBoolean(true); // to avoid a lingering thread when test has completed
MatcherWatchdog watchdog = MatcherWatchdog.newInstance(10, 100, System::currentTimeMillis, (delay, command) -> {
Expand All @@ -63,7 +62,7 @@ public void testInterrupt() throws Exception {
Thread thread = new Thread(() -> {
Matcher matcher = mock(Matcher.class);
watchdog.register(matcher);
verify(matcher, timeout(9999).times(1)).interrupt();
verify(matcher, timeout(9999).atLeastOnce()).interrupt();
interrupted.set(true);
while (run.get()) {} // wait here so that the size of the registry can be asserted
watchdog.unregister(matcher);
Expand Down

0 comments on commit 2b4aaab

Please sign in to comment.