summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2009-07-02 08:19:34 +0000
committerAidan Skinner <aidan@apache.org>2009-07-02 08:19:34 +0000
commitee8ab4e977e0aebfe1473260904624c006466114 (patch)
tree38a7dc2e4fb4336bc6907342561d748d2b499e59 /qpid/java
parente38976389b8577c731c655cd64a9fe3c167f9b65 (diff)
downloadqpid-python-ee8ab4e977e0aebfe1473260904624c006466114.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@790493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java
index 242efc2f5d..205a741b2f 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java
+++ b/qpid/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();
}
}