qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject svn commit: r979290 - in /qpid/trunk/qpid/java: client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java common/src/test/java/org/apache/qpid/transport/ConnectionTest.java test-profiles/Java010Excludes
Date Mon, 26 Jul 2010 14:08:45 GMT
Author: grkvlt
Date: Mon Jul 26 14:08:45 2010
New Revision: 979290

URL: http://svn.apache.org/viewvc?rev=979290&view=rev
Log:
QPID-2760: Only client 0-10 session sync should throw any exceptions

Modified:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
    qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
    qpid/trunk/qpid/java/test-profiles/Java010Excludes

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=979290&r1=979289&r2=979290&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
(original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Mon Jul 26 14:08:45 2010
@@ -1029,6 +1029,7 @@ public class AMQSession_0_10 extends AMQ
     public void sync() throws AMQException
     {
         _qpidSession.sync();
+        getCurrentException();
     }
 
     public AMQMessageDelegateFactory getMessageDelegateFactory()

Modified: qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java?rev=979290&r1=979289&r2=979290&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
(original)
+++ qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
Mon Jul 26 14:08:45 2010
@@ -425,6 +425,10 @@ public class ConnectionTest extends Test
         }
     }
 
+    /**
+     * The 0-10 {@code executionSync} command should set the exception status in the session,
+     * so that the client session object can then throw it as an {@link AMQException}.
+     */
     public void testExecutionExceptionSync() throws Exception
     {
         startServer();
@@ -433,14 +437,11 @@ public class ConnectionTest extends Test
         conn.connect("localhost", port, null, "guest", "guest");
         Session ssn = conn.createSession();
         send(ssn, "EXCP 0", true);
-        try
-        {
-            ssn.sync();
-        }
-        catch (SessionException exc)
-        {
-            assertNotNull(exc.getException());
-        }
+        ExecutionException before = ssn.getException();
+        assertNull("There should not be an exception stored in the session", before);
+        ssn.sync();
+        ExecutionException after = ssn.getException();
+        assertNotNull("There should be an exception stored in the session", after);
     }
 
 }

Modified: qpid/trunk/qpid/java/test-profiles/Java010Excludes
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/Java010Excludes?rev=979290&r1=979289&r2=979290&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/Java010Excludes (original)
+++ qpid/trunk/qpid/java/test-profiles/Java010Excludes Mon Jul 26 14:08:45 2010
@@ -58,7 +58,6 @@ org.apache.qpid.transport.network.mina.M
 org.apache.qpid.test.unit.basic.LargeMessageTest#*
 org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testCreateExchange
 org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testBrowseMode
-org.apache.qpid.systest.GlobalQueuesTest#testTopicDurableConsumerMessageAge
 
 //QPID-2418 : Not yet implemented on 0-10
 org.apache.qpid.test.unit.topic.DurableSubscriptionTest#testResubscribeWithChangedSelector



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


Mime
View raw message