Author: aidan
Date: Thu Jul  2 08:19:34 2009
New Revision: 790493

URL: http://svn.apache.org/viewvc?rev=790493&view=rev
Log:
QPID-1965: use transacted send since we *really need* the messages to be
there by the time was start looking for the log messages.

Modified:
    
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java

Modified: 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java?rev=790493&r1=790492&r2=790493&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java
 (original)
+++ 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java
 Thu Jul  2 08:19:34 2009
@@ -97,7 +97,7 @@
         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 @@
     {
         // 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 @@
     {
         // send some messages and nuke the logs
         sendMessage(_session, _destination, 2);
+        _session.commit();
         stopBroker();
         (new FileOutputStream(_logfile)).getChannel().truncate(0);
         
@@ -169,10 +172,11 @@
         _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();
     }
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to