You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/03/13 11:29:33 UTC

[camel] branch master updated: Camel-Infinispan: more Cleanup

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 36140f5  Camel-Infinispan: more Cleanup
36140f5 is described below

commit 36140f5936a1a182cf778e37bf42f4406bd9e752
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 13 12:28:35 2020 +0100

    Camel-Infinispan: more Cleanup
---
 .../processor/idempotent/InfinispanIdempotentRepositoryIT.java   | 9 ++++++++-
 .../processor/idempotent/InfinispanIdempotentRepositoryTest.java | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryIT.java b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryIT.java
index 82c2b8f..69457ee 100644
--- a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryIT.java
+++ b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryIT.java
@@ -25,17 +25,24 @@ import org.apache.camel.test.junit4.CamelTestSupport;
 import org.infinispan.client.hotrod.RemoteCache;
 import org.infinispan.client.hotrod.RemoteCacheManager;
 import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
 public class InfinispanIdempotentRepositoryIT extends CamelTestSupport {
 
+    private RemoteCacheManager manager = new RemoteCacheManager();
+    
     @Before
     public void setupCache() {
-        RemoteCacheManager manager = new RemoteCacheManager();
         RemoteCache<Object, Object> cache = manager.administration().getOrCreateCache("idempotent", (String) null);
         assertNotNull(cache);
     }
+    
+    @After
+    public void cleanupCache() {
+        manager.close();
+    }
 
     @Test
     public void producerQueryOperationWithoutQueryBuilder() throws Exception {
diff --git a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryTest.java b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryTest.java
index 3a6c005..8e41501 100644
--- a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryTest.java
+++ b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/processor/idempotent/InfinispanIdempotentRepositoryTest.java
@@ -38,7 +38,7 @@ public class InfinispanIdempotentRepositoryTest {
 
     @Before
     public void setUp() {
-        GlobalConfiguration global = new GlobalConfigurationBuilder().defaultCacheName("default").globalJmxStatistics().allowDuplicateDomains(true).build();
+        GlobalConfiguration global = new GlobalConfigurationBuilder().defaultCacheName("default").jmx().domain("test").build();
         Configuration conf = new ConfigurationBuilder().build();
         basicCacheContainer = new DefaultCacheManager(global, conf);
         basicCacheContainer.start();