Skip to content

Commit

Permalink
HADOOP-19250. Fix test TestServiceInterruptHandling.testRegisterAndRa…
Browse files Browse the repository at this point in the history
…ise (#6987)


Contributed by Chenyu Zheng
  • Loading branch information
zhengchenyu authored Aug 16, 2024
1 parent f000942 commit bf804cb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.hadoop.service.BreakableService;
import org.apache.hadoop.service.launcher.testservices.FailureTestService;
import org.apache.hadoop.test.GenericTestUtils;
import org.apache.hadoop.util.ExitUtil;
import org.junit.Test;
import org.slf4j.Logger;
Expand All @@ -43,10 +44,8 @@ public void testRegisterAndRaise() throws Throwable {
assertEquals(0, irqHandler.getSignalCount());
irqHandler.raise();
// allow for an async event
Thread.sleep(500);
IrqHandler.InterruptData data = catcher.interruptData;
assertNotNull("interrupt data", data);
assertEquals(name, data.getName());
GenericTestUtils.waitFor(() -> catcher.interruptData != null, 100, 10000);
assertEquals(name, catcher.interruptData.getName());
assertEquals(1, irqHandler.getSignalCount());
}

Expand Down

0 comments on commit bf804cb

Please sign in to comment.