From 5efad350d8c73071823e839daf56667d5847f935 Mon Sep 17 00:00:00 2001 From: andsel Date: Mon, 12 Sep 2016 17:49:40 +0200 Subject: [PATCH] Fixed the configuration of HZ for local tests to avoid multicast preferring tcp local address --- .../interception/HazelcastInterceptHandler.java | 2 +- ...egrationHazelcastHandlerInterceptorTest.java | 3 --- broker/src/test/resources/config/hazelcast.xml | 17 ++++++++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/broker/src/main/java/io/moquette/interception/HazelcastInterceptHandler.java b/broker/src/main/java/io/moquette/interception/HazelcastInterceptHandler.java index ce21d926..a1b7e990 100644 --- a/broker/src/main/java/io/moquette/interception/HazelcastInterceptHandler.java +++ b/broker/src/main/java/io/moquette/interception/HazelcastInterceptHandler.java @@ -15,7 +15,7 @@ public class HazelcastInterceptHandler extends AbstractInterceptHandler { private static final Logger LOG = LoggerFactory.getLogger(HazelcastInterceptHandler.class); private final HazelcastInstance hz; - public HazelcastInterceptHandler (Server server){ + public HazelcastInterceptHandler(Server server){ this.hz = server.getHazelcastInstance(); } diff --git a/broker/src/test/java/io/moquette/server/ServerIntegrationHazelcastHandlerInterceptorTest.java b/broker/src/test/java/io/moquette/server/ServerIntegrationHazelcastHandlerInterceptorTest.java index ca6e7174..ec880b31 100644 --- a/broker/src/test/java/io/moquette/server/ServerIntegrationHazelcastHandlerInterceptorTest.java +++ b/broker/src/test/java/io/moquette/server/ServerIntegrationHazelcastHandlerInterceptorTest.java @@ -21,9 +21,6 @@ import java.util.Properties; import static org.junit.Assert.assertEquals; -/** - * Created by mackristof on 13/05/2016. - */ public class ServerIntegrationHazelcastHandlerInterceptorTest{ private static final Logger LOG = LoggerFactory.getLogger(ServerIntegrationHazelcastHandlerInterceptorTest.class); diff --git a/broker/src/test/resources/config/hazelcast.xml b/broker/src/test/resources/config/hazelcast.xml index e9e500f6..c00b6a9d 100644 --- a/broker/src/test/resources/config/hazelcast.xml +++ b/broker/src/test/resources/config/hazelcast.xml @@ -3,8 +3,23 @@ http://www.hazelcast.com/schema/config/hazelcast-config-3.5.xsd" xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + log4j + + - + 5701 + + + + 127.0.0.1 + + + + 127.0.0.* + + + \ No newline at end of file