8384858687888990919293
long duration = controller.waitForEvents(3); Assert.assertTrue(duration + MARGIN_TIME > KEEPALIVE_INTERVAL_TIME * NUM_KEEP_ALIVES); keepAliveManager.stop(); } @Test public void oneMediaPipelineTest() throws InterruptedException {
110111112113114115116117118119120
Thread.sleep(KEEPALIVE_INTERVAL_TIME * 3); Assert.assertTrue("keepAlive events should be at least 2", controller.clearEvents() >= 2); keepAliveManager.stop(); } @Test public void addRemovePipelinesTest() throws InterruptedException {
150151152153154155156157
Assert.assertTrue( "keepAliveManager without pipelines shouldn't send keepAlives", controller.clearEvents() == 0); keepAliveManager.stop(); } }