/** {@inheritDoc} */ @Override public boolean detectStarvation() { return exec.detectStarvation(); }
/** {@inheritDoc} */ @Deprecated @Override public void checkStarvation() { exec.detectStarvation(); }
/** * @throws Exception If failed. */ @Test public void testStarvationDetected() throws Exception { final int stripeIdx = 0; stripedExecSvc.execute(stripeIdx, new TestRunnable(true)); sleepASec(); assertFalse(GridTestUtils.waitForCondition(() -> stripedExecSvc.activeStripesCount() == 0, 2000)); stripedExecSvc.execute(stripeIdx, new TestRunnable()); assertTrue(GridTestUtils.waitForCondition(() -> stripedExecSvc.activeStripesCount() == 1, 10000)); assertTrue(stripedExecSvc.detectStarvation()); }