You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/09/01 02:02:17 UTC
[1/2] activemq-artemis git commit: test fix on DuplicateCacheTest
Repository: activemq-artemis
Updated Branches:
refs/heads/master b53cce1c2 -> d31b0ea35
test fix on DuplicateCacheTest
Waiting for proper executor to finish
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/0f875057
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/0f875057
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/0f875057
Branch: refs/heads/master
Commit: 0f8750573ce200febc84ba798c5beea4b5afc064
Parents: b53cce1
Author: Clebert Suconic <cl...@apache.org>
Authored: Mon Aug 31 19:48:37 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Aug 31 19:49:01 2015 -0400
----------------------------------------------------------------------
.../persistence/DuplicateCacheTest.java | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0f875057/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java
index 0ac18a5..208c553 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java
@@ -16,7 +16,12 @@
*/
package org.apache.activemq.artemis.tests.integration.persistence;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.io.IOCallback;
+import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl;
import org.apache.activemq.artemis.core.postoffice.DuplicateIDCache;
import org.apache.activemq.artemis.core.postoffice.impl.DuplicateIDCacheImpl;
import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
@@ -69,6 +74,22 @@ public class DuplicateCacheTest extends StorageManagerTestBase {
cache.deleteFromCache(id);
+ final CountDownLatch latch = new CountDownLatch(1);
+ OperationContextImpl.getContext().executeOnCompletion(new IOCallback() {
+ @Override
+ public void done() {
+ latch.countDown();
+ }
+
+ @Override
+ public void onError(int errorCode, String errorMessage) {
+
+ }
+ });
+
+
+ Assert.assertTrue(latch.await(1, TimeUnit.MINUTES));
+
Assert.assertFalse(cache.contains(id));
}
[2/2] activemq-artemis git commit: simply a supressWarnings annotation
Posted by cl...@apache.org.
simply a supressWarnings annotation
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/d31b0ea3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/d31b0ea3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/d31b0ea3
Branch: refs/heads/master
Commit: d31b0ea35256dbf89038557aaf9b15ead75bc8e7
Parents: 0f87505
Author: Clebert Suconic <cl...@apache.org>
Authored: Mon Aug 31 20:02:10 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Aug 31 20:02:10 2015 -0400
----------------------------------------------------------------------
.../org/apache/activemq/artemis/uri/TCPServerLocatorSchema.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d31b0ea3/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/TCPServerLocatorSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/TCPServerLocatorSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/TCPServerLocatorSchema.java
index ab8d10f..cb7a4bd 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/TCPServerLocatorSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/TCPServerLocatorSchema.java
@@ -76,10 +76,13 @@ public class TCPServerLocatorSchema extends AbstractServerLocatorSchema {
return new URI(SchemaConstants.TCP, null, getHost(params), getPort(params), null, createQuery(params, query), fragment.toString());
}
+ @SuppressWarnings("StringEquality")
private static Map<String, Object> escapeIPv6Host(Map<String, Object> params) {
String host = (String) params.get("host");
String newHost = IPV6Util.encloseHost(host);
+ // We really want to check the objects here
+ // Some bug finders may report this as an error, hence the SupressWarnings on this method
if (host != newHost) {
params.put("host", "[" + host + "]");
}