8788899091929394959697
assertEquals(ids.length, 2); handler.removeNotificationListeners(new Integer[]{new Integer(1), new Integer(2)}); assertTrue(handler.isActive()); handler.stop(); assertTrue(!handler.isActive()); } finally { handler.stop();
9293949596979899100101102
handler.stop(); assertTrue(!handler.isActive()); } finally { handler.stop(); } } public void testAddRemove() throws Exception {
149150151152153154155156157158159
handler.removeNotificationListeners(new Integer[]{new Integer(1)}); assertFalse(handler.contains(new NotificationTuple(name, listener, null, null))); } finally { handler.stop(); } } public void testNotificationDelivery() throws Exception {
248249250251252253254255256257258
handler.removeNotificationListeners(new Integer[]{new Integer(1)}); sleep(2000); } finally { handler.stop(); } } public void testNotificationsLost() throws Exception {
317318319320321322323324325326327
handler.removeNotificationListeners(new Integer[]{id}); } finally { handler.stop(); } } public void testConnectionFailure() throws Exception {
368369370371372373374375376377378
assertTrue(!handler.isActive()); } finally { handler.stop(); } } public void testQueueOverflow() throws Exception {
477478479480481482483484485
while (delivered.get() < queued.get()) lock.wait(10); } } finally { handler.stop(); } } }