Commit ff53ac07 authored by afreyssin's avatar afreyssin
Browse files

Adds verification for receiveNoWait.

parent c163f2bc
......@@ -85,14 +85,24 @@ public class BridgeTest extends TestCase {
msg=(TextMessage) joramCons.receive();
System.out.println("receive msg = " + msg.getText());
assertEquals("Foreign message number "+i,msg.getText());
}
msg=(TextMessage) joramCons.receiveNoWait();
assertTrue(msg == null);
foreignMsg = foreignSess.createTextMessage();
foreignMsg.setText("New foreign message");
foreignSender.send(foreignMsg);
Thread.sleep(1000L);
msg = (TextMessage) joramCons.receive();
assertTrue(msg != null);
if (msg != null)
assertEquals(foreignMsg.getText(), msg.getText());
foreignCnx.close();
joramCnx.close();
} catch (Throwable exc) {
exc.printStackTrace();
error(exc);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment