qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lqu...@apache.org
Subject svn commit: r1753656 - in /qpid/java/trunk/broker-core/src: main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java test/java/org/apache/qpid/server/virtualhost/AbstractVirtualHostTest.java
Date Thu, 21 Jul 2016 10:24:31 GMT
Author: lquack
Date: Thu Jul 21 10:24:31 2016
New Revision: 1753656

URL: http://svn.apache.org/viewvc?rev=1753656&view=rev
Log:
QPID-7278: [Java Broker] validate VirtualHost message store in onValidate

Modified:
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
    qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/virtualhost/AbstractVirtualHostTest.java

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java?rev=1753656&r1=1753655&r2=1753656&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
(original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
Thu Jul 21 10:24:31 2016
@@ -368,6 +368,7 @@ public abstract class AbstractVirtualHos
         }
 
         validateConnectionThreadPoolSettings(this);
+        validateMessageStoreCreation();
     }
 
     @Override

Modified: qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/virtualhost/AbstractVirtualHostTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/virtualhost/AbstractVirtualHostTest.java?rev=1753656&r1=1753655&r2=1753656&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/virtualhost/AbstractVirtualHostTest.java
(original)
+++ qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/virtualhost/AbstractVirtualHostTest.java
Thu Jul 21 10:24:31 2016
@@ -21,10 +21,10 @@
 package org.apache.qpid.server.virtualhost;
 
 import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -197,14 +197,17 @@ public class AbstractVirtualHostTest ext
             {
                 return  store;
             }
+
+            @Override
+            protected void onExceptionInOpen(final RuntimeException e)
+            {
+                fail("open failed");
+            }
         };
 
         host.open();
         assertEquals("Unexpected host state", State.ACTIVE, host.getState());
-        verify(store).openMessageStore(host);
-
-        // make sure that method AbstractVirtualHost.onExceptionInOpen was not called
-        verify(store, times(0)).closeMessageStore();
+        verify(store, atLeastOnce()).openMessageStore(host);
         host.close();
     }
 



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


Mime
View raw message