this.messagingClient.getMessageProcessor().interrupt(); try { this.messagingClient.closeConnection();
this.messagingClient.getMessageProcessor().interrupt(); this.messagingClient.closeConnection();
@After public void releaseClients() throws Exception { for( ReconfigurableClient<?> client : this.clients ) { client.getMessageProcessor().stopProcessor(); client.getMessageProcessor().interrupt(); client.closeConnection(); } this.clients.clear(); }
@Test public void testInterrupt() throws Exception { Assert.assertFalse( this.processor.isRunning()); this.processor.start(); Thread.sleep( 200 ); Assert.assertTrue( this.processor.isRunning()); this.processor.interrupt(); Thread.sleep( 200 ); Assert.assertFalse( this.processor.isRunning()); }