qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1562452 - in /qpid/trunk/qpid/java: broker-core/src/main/java/org/apache/qpid/server/store/ systests/src/main/java/org/apache/qpid/server/store/ systests/src/main/java/org/apache/qpid/test/client/timeouts/
Date Wed, 29 Jan 2014 14:20:20 GMT
Author: kwall
Date: Wed Jan 29 14:20:20 2014
New Revision: 1562452

URL: http://svn.apache.org/r1562452
Log:
QPID-5211: Prevent spurious not valid state transitions for MemoryMessageStore and test QuotaMessageStore

Modified:
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java?rev=1562452&r1=1562451&r2=1562452&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java
Wed Jan 29 14:20:20 2014
@@ -133,9 +133,11 @@ abstract public class AbstractMemoryMess
     @Override
     public void close() throws Exception
     {
-        _stateManager.attainState(State.CLOSING);
-        _closed.getAndSet(true);
-        _stateManager.attainState(State.CLOSED);
+        if (_closed.compareAndSet(false, true))
+        {
+            _stateManager.attainState(State.CLOSING);
+            _stateManager.attainState(State.CLOSED);
+        }
     }
 
     @Override

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java?rev=1562452&r1=1562451&r2=1562452&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
Wed Jan 29 14:20:20 2014
@@ -154,9 +154,11 @@ public class
     @Override
     public void close() throws Exception
     {
-        _stateManager.attainState(State.CLOSING);
-        _closed.getAndSet(true);
-        _stateManager.attainState(State.CLOSED);
+        if (_closed.compareAndSet(false, true))
+        {
+            _stateManager.attainState(State.CLOSING);
+            _stateManager.attainState(State.CLOSED);
+        }
     }
 
     @Override

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java?rev=1562452&r1=1562451&r2=1562452&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java
Wed Jan 29 14:20:20 2014
@@ -57,7 +57,7 @@ public class SyncWaitDelayTest extends Q
 
         final String prefix = "virtualhosts.virtualhost." + VIRTUALHOST;
         setVirtualHostConfigurationProperty(prefix + ".type", StandardVirtualHostFactory.TYPE);
-        setVirtualHostConfigurationProperty(prefix + ".store.class", "org.apache.qpid.server.store.SlowMessageStore");
+        setVirtualHostConfigurationProperty(prefix + ".store.class", org.apache.qpid.server.store.SlowMessageStore.class.getName());
         setVirtualHostConfigurationProperty(prefix + ".store.delays.commitTran.post", String.valueOf(POST_COMMIT_DELAY));
 
         super.setUp();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message