checkHealth(watchdogService, Health.GREEN);
}
}, taskOwner);
DataService dataService = createDataService(serviceProps);
final WatchdogServiceImpl watchdog =
new WatchdogServiceImpl(serviceProps, systemRegistry, txnProxy,
dummyShutdownCtrl);
try {
txnScheduler.runTask(new TestAbstractKernelRunnable() {
public void run() throws Exception {
checkHealth(watchdogService, Health.GREEN);
}
}, taskOwner);
watchdogService.shutdown();
// wait for watchdog's renew to fail...
Thread.sleep(renewTime * 4);
txnScheduler.runTask(new TestAbstractKernelRunnable() {
public void run() throws Exception {
checkHealth(watchdog, Health.RED);
}
}, taskOwner);
} finally {
watchdog.shutdown();
dataService.shutdown();
}
}