qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject qpid-broker-j git commit: NO-JIRA: [Java System Tests] Added extra logging to help understand an occasional test failure
Date Tue, 03 Oct 2017 12:15:27 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 9f92eedde -> 700eecc27


NO-JIRA: [Java System Tests] Added extra logging to help understand an occasional test failure


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/700eecc2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/700eecc2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/700eecc2

Branch: refs/heads/master
Commit: 700eecc27d25f5974f7c9809e221b9fc8ff6d5ed
Parents: 9f92eed
Author: Keith Wall <kwall@apache.org>
Authored: Tue Oct 3 13:10:22 2017 +0100
Committer: Keith Wall <kwall@apache.org>
Committed: Tue Oct 3 13:10:22 2017 +0100

----------------------------------------------------------------------
 .../BDBHAVirtualHostNodeTestHelper.java         | 21 ++++++++++++--------
 test-profiles/JavaDerbyExcludes                 |  1 +
 2 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/700eecc2/bdbstore/src/test/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeTestHelper.java
----------------------------------------------------------------------
diff --git a/bdbstore/src/test/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeTestHelper.java
b/bdbstore/src/test/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeTestHelper.java
index db9dc46..22b080d 100644
--- a/bdbstore/src/test/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeTestHelper.java
+++ b/bdbstore/src/test/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeTestHelper.java
@@ -40,6 +40,8 @@ import java.util.UUID;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.sleepycat.je.rep.ReplicationConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.qpid.server.configuration.updater.TaskExecutor;
 import org.apache.qpid.server.configuration.updater.TaskExecutorImpl;
@@ -65,15 +67,17 @@ import org.apache.qpid.server.util.FileUtils;
  */
 public class BDBHAVirtualHostNodeTestHelper
 {
+    private static final Logger LOGGER = LoggerFactory.getLogger(BDBHAVirtualHostNodeTestHelper.class);
+
     private final String _testName;
-    private Broker<?> _broker;
-    private File _bdbStorePath;
-    private TaskExecutor _taskExecutor;
+    private final Broker<?> _broker;
+    private final File _bdbStorePath;
+    private final TaskExecutor _taskExecutor;
     private final ConfiguredObjectFactory _objectFactory = BrokerModel.getInstance().getObjectFactory();
     private final Set<BDBHAVirtualHostNode<?>> _nodes = new HashSet<>();
-    private int _numberOfSleeps;
+    private final int _numberOfSleeps;
     private final int _sleepInterval;
-    private int _waitForVirtualhostInterval;
+    private final int _waitForVirtualhostInterval;
 
     public BDBHAVirtualHostNodeTestHelper(String testName) throws Exception
     {
@@ -125,6 +129,7 @@ public class BDBHAVirtualHostNodeTestHelper
             }
             if (_bdbStorePath != null)
             {
+                LOGGER.debug("Deleting '{}'", _bdbStorePath);
                 FileUtils.delete(_bdbStorePath, true);
             }
         }
@@ -280,7 +285,7 @@ public class BDBHAVirtualHostNodeTestHelper
                                                     String helperAddress, String helperNodeNode,
int... ports)
             throws Exception
     {
-        Map<String, Object> node1Attributes = new HashMap<String, Object>();
+        Map<String, Object> node1Attributes = new HashMap<>();
         node1Attributes.put(BDBHAVirtualHostNode.ID, UUID.randomUUID());
         node1Attributes.put(BDBHAVirtualHostNode.TYPE, BDBHAVirtualHostNodeImpl.VIRTUAL_HOST_NODE_TYPE);
         node1Attributes.put(BDBHAVirtualHostNode.NAME, nodeName);
@@ -297,7 +302,7 @@ public class BDBHAVirtualHostNodeTestHelper
             node1Attributes.put(BDBHAVirtualHostNode.HELPER_NODE_NAME, helperNodeNode);
         }
 
-        Map<String, String> context = new HashMap<String, String>();
+        Map<String, String> context = new HashMap<>();
         context.put(ReplicationConfig.REPLICA_ACK_TIMEOUT, "2 s");
         context.put(ReplicationConfig.INSUFFICIENT_REPLICAS_TIMEOUT, "2 s");
 
@@ -326,7 +331,7 @@ public class BDBHAVirtualHostNodeTestHelper
 
     public static List<String> getPermittedNodes(int[] ports)
     {
-        List<String> permittedNodes = new ArrayList<String>();
+        List<String> permittedNodes = new ArrayList<>();
         for (int port:ports)
         {
             permittedNodes.add("localhost:" + port);

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/700eecc2/test-profiles/JavaDerbyExcludes
----------------------------------------------------------------------
diff --git a/test-profiles/JavaDerbyExcludes b/test-profiles/JavaDerbyExcludes
index 814406f..9411d0f 100644
--- a/test-profiles/JavaDerbyExcludes
+++ b/test-profiles/JavaDerbyExcludes
@@ -19,4 +19,5 @@
 
 org.apache.qpid.server.store.berkeleydb.*
 org.apache.qpid.server.store.berkeleydb.replication.*
+org.apache.qpid.server.virtualhostnode.berkeleydb.*
 


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


Mime
View raw message