diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java index 90628ea54c..c8f0d4d7c6 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java @@ -380,7 +380,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent { if (error) { ActiveMQUtilLogger.LOGGER.failedToReadFromStream(inputLine); } else { - logger.trace(inputLine); + logger.debug(inputLine); } } diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/NetworkHealthTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/NetworkHealthTest.java index b332428236..de25525301 100644 --- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/NetworkHealthTest.java +++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/NetworkHealthTest.java @@ -37,6 +37,8 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import static org.junit.Assume.assumeTrue; + public class NetworkHealthTest { private static final InetAddress INVALID_ADDRESS; @@ -127,6 +129,7 @@ public class NetworkHealthTest { @Test public void testCheck6() throws Exception { + assumeTrue(purePingWorks(IPV6_LOCAL)); NetworkHealthCheck check = addCheck(new NetworkHealthCheck(null, 100, 100)); check.addComponent(component); @@ -161,6 +164,7 @@ public class NetworkHealthTest { @Test public void testPings() throws Exception { + assumeTrue(purePingWorks("127.0.0.1")); doCheck("127.0.0.1"); } @@ -181,9 +185,18 @@ public class NetworkHealthTest { @Test public void testPingsIPV6() throws Exception { + assumeTrue(purePingWorks(IPV6_LOCAL)); doCheck(IPV6_LOCAL); } + private boolean purePingWorks(String localaddress) throws Exception { + try { + return addCheck(new NetworkHealthCheck(null, 100, 100)).purePing(InetAddress.getByName(localaddress)); + } catch (Exception e) { + return false; + } + } + @Test public void testCheckNoNodes() throws Exception { NetworkHealthCheck check = addCheck(new NetworkHealthCheck()); diff --git a/examples/features/sub-modules/tomcat/pom.xml b/examples/features/sub-modules/tomcat/pom.xml index f04fd61900..edaebff255 100644 --- a/examples/features/sub-modules/tomcat/pom.xml +++ b/examples/features/sub-modules/tomcat/pom.xml @@ -34,6 +34,7 @@ under the License. Artemis Tomcat JNDI Resources Example + ${project.basedir}/../../../.. UTF-8 ${project.baseUri} 1.6 diff --git a/examples/features/sub-modules/tomcat/src/main/java/org/apache/activemq/artemis/example/tomcat/sample/SendMessageController.java b/examples/features/sub-modules/tomcat/src/main/java/org/apache/activemq/artemis/example/tomcat/sample/SendMessageController.java index eb36179bdd..67807d458f 100644 --- a/examples/features/sub-modules/tomcat/src/main/java/org/apache/activemq/artemis/example/tomcat/sample/SendMessageController.java +++ b/examples/features/sub-modules/tomcat/src/main/java/org/apache/activemq/artemis/example/tomcat/sample/SendMessageController.java @@ -30,19 +30,18 @@ import org.springframework.web.bind.annotation.RestController; @RestController public class SendMessageController { - - @Autowired - private JmsTemplate jmsTemplate; - - - @RequestMapping("/send") - public @ResponseBody String send(@RequestParam(value="text", defaultValue="hello world") final String text) { - jmsTemplate.send(new MessageCreator() { - @Override - public Message createMessage(Session session) throws JMSException { - return session.createTextMessage(text); - } - }); - return "sent: " + text; - } + + @Autowired + private JmsTemplate jmsTemplate; + + @RequestMapping("/send") + public @ResponseBody String send(@RequestParam(value = "text", defaultValue = "hello world") final String text) { + jmsTemplate.send(new MessageCreator() { + @Override + public Message createMessage(Session session) throws JMSException { + return session.createTextMessage(text); + } + }); + return "sent: " + text; + } } \ No newline at end of file diff --git a/examples/protocols/mqtt/clustered-queue-mqtt/pom.xml b/examples/protocols/mqtt/clustered-queue-mqtt/pom.xml index 374d703931..190cfbe137 100644 --- a/examples/protocols/mqtt/clustered-queue-mqtt/pom.xml +++ b/examples/protocols/mqtt/clustered-queue-mqtt/pom.xml @@ -22,8 +22,8 @@ under the License. 4.0.0 - org.apache.activemq.examples.clustered - broker-clustered + org.apache.activemq.examples.mqtt + mqtt-examples 2.5.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 4ddca3e3b8..c34fcc4c5e 100644 --- a/pom.xml +++ b/pom.xml @@ -143,7 +143,6 @@ true true true - true UTF-8 UTF-8 @@ -186,6 +185,10 @@ linux-x86_64 osx-x86_64 + + + true @@ -996,7 +999,6 @@ false false false - false @@ -1026,11 +1028,10 @@ false false false - false - true false false false + false @@ -1419,7 +1420,7 @@ 2.18.1 once - true + ${testFailureIgnore} alphabetical false ${activemq-surefire-argline}