diff options
| author | Aidan Skinner <aidan@apache.org> | 2009-07-02 08:19:34 +0000 |
|---|---|---|
| committer | Aidan Skinner <aidan@apache.org> | 2009-07-02 08:19:34 +0000 |
| commit | f3841781412f5cc77ea26c6b4ac609a48db9f14f (patch) | |
| tree | e465e044ae55708c14739cc028e53250069d7184 /java | |
| parent | 1a9d30b0413b5d92a8481f99a5249e94d3595087 (diff) | |
| download | qpid-python-f3841781412f5cc77ea26c6b4ac609a48db9f14f.tar.gz | |
QPID-1965: use transacted send since we *really need* the messages to be
there by the time was start looking for the log messages.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java b/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java index 242efc2f5d..205a741b2f 100644 --- a/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java +++ b/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java @@ -97,7 +97,7 @@ public class AlertingTest extends QpidTestCase super.setUp(); _connection = getConnection(); - _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + _session = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE); _destination = _session.createQueue("testQueue"); // Consumer is only used to actually create the destination @@ -146,12 +146,14 @@ public class AlertingTest extends QpidTestCase { // Send 5 messages, make sure that the alert was fired properly. sendMessage(_session, _destination, _numMessages + 1); + _session.commit(); wasAlertFired(); } public void testAlertingReallyWorksWithRestart() throws Exception { sendMessage(_session, _destination, _numMessages + 1); + _session.commit(); stopBroker(); (new FileOutputStream(_logfile)).getChannel().truncate(0); startBroker(); @@ -162,6 +164,7 @@ public class AlertingTest extends QpidTestCase { // send some messages and nuke the logs sendMessage(_session, _destination, 2); + _session.commit(); stopBroker(); (new FileOutputStream(_logfile)).getChannel().truncate(0); @@ -169,10 +172,11 @@ public class AlertingTest extends QpidTestCase _configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".queues.maximumMessageCount", 5); startBroker(); _connection = getConnection(); - _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + _session = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE); // Trigger the new value sendMessage(_session, _destination, 3); + _session.commit(); wasAlertFired(); } } |
