Commit 63d8e592 authored by afreyssin's avatar afreyssin

Highlight JORAM-279 issue.

parent 24d4b467
...@@ -103,7 +103,7 @@ public class ClientTest26 extends TestCase { ...@@ -103,7 +103,7 @@ public class ClientTest26 extends TestCase {
producer.send(msg); producer.send(msg);
consumer.setMessageListener(new MessageListener() { consumer.setMessageListener(new MessageListener() {
private int counter; private int counter = 0;
public void onMessage(Message message) { public void onMessage(Message message) {
try { try {
...@@ -115,7 +115,6 @@ public class ClientTest26 extends TestCase { ...@@ -115,7 +115,6 @@ public class ClientTest26 extends TestCase {
+ ", getJMSRedelivered = " + message.getJMSRedelivered()); + ", getJMSRedelivered = " + message.getJMSRedelivered());
if (message.getBooleanProperty("last") == false) { if (message.getBooleanProperty("last") == false) {
System.out.println("first message isRedelivered = " + message.getJMSRedelivered());
assertEquals("received first message, redelivered must be false", false, message.getJMSRedelivered()); assertEquals("received first message, redelivered must be false", false, message.getJMSRedelivered());
} else { } else {
if (message.getJMSRedelivered() == false) { if (message.getJMSRedelivered() == false) {
...@@ -123,16 +122,15 @@ public class ClientTest26 extends TestCase { ...@@ -123,16 +122,15 @@ public class ClientTest26 extends TestCase {
System.out.println("==== second message: recover"); System.out.println("==== second message: recover");
session.recover(); session.recover();
} else { } else {
// should be redelivered after recover // should be redelivered after recover
System.out.println("==== second message again as expected"); System.out.println("==== second message again");
ClientTest26.this.notify(); ClientTest26.this.notify();
} }
} }
if (counter > 3) { if (counter > 3) {
ClientTest26.this.notify(); ClientTest26.this.notify();
fail("The message reiceved > 3."); fail("Too many messages received > 3.");
} }
} }
...@@ -146,6 +144,7 @@ public class ClientTest26 extends TestCase { ...@@ -146,6 +144,7 @@ public class ClientTest26 extends TestCase {
// System.out.println("wait"); // System.out.println("wait");
wait(20000); wait(20000);
} }
Thread.sleep(1000L);
// System.out.println("close"); // System.out.println("close");
connection.close(); connection.close();
......
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