mainstemMonitor.releaseMainstem();
}
@Test
public void testManualRelease() {
MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
boolean running = mainstemMonitor.check();
want.bool(running).is(true);
mainstemMonitor.setDelayTime(5);
switchWarmup(channelId, pipelineId);
sleep(1000L); // 等manual release被响应
long start = System.currentTimeMillis();
try {
mainstemMonitor.waitForActive();
} catch (InterruptedException e) {
want.fail();
}
want.number(System.currentTimeMillis() - start).isGe(4000L);
ArbitrateFactory.destory(pipelineId);
mainstemMonitor.releaseMainstem();
}