From 325b5f1a1b918de84d934edc13b18f19f76b3448 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 20 Feb 2018 09:16:09 -0600 Subject: [PATCH 1/4] ARTEMIS-1684 fail build for failed 'fast' tests --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ddca3e3b81..698ba5556c3 100644 --- a/pom.xml +++ b/pom.xml @@ -186,6 +186,10 @@ linux-x86_64 osx-x86_64 + + + true @@ -1031,6 +1035,7 @@ false false false + false @@ -1419,7 +1424,7 @@ 2.18.1 once - true + ${testFailureIgnore} alphabetical false ${activemq-surefire-argline} From c1900e5ac35ba2eb6a99138b3329eb5a14235759 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 20 Feb 2018 09:54:35 -0600 Subject: [PATCH 2/4] ARTEMIS-1684 disable problematic tests --- .../artemis/core/server/NetworkHealthCheck.java | 2 +- .../activemq/artemis/utils/NetworkHealthTest.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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 90628ea54c3..c8f0d4d7c6e 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 @@ private void readStream(InputStream stream, boolean error) throws IOException { 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 b3324282364..de255253013 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.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 void after() { @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 void testParseLogger() throws Exception { @Test public void testPings() throws Exception { + assumeTrue(purePingWorks("127.0.0.1")); doCheck("127.0.0.1"); } @@ -181,9 +185,18 @@ private void doCheck(String localaddress) throws Exception { @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()); From 3463e70e9d866a30f87b66d22f21ed8f8a455fa5 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Wed, 21 Feb 2018 09:56:38 -0600 Subject: [PATCH 3/4] NO-JIRA remove redundant properties --- pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pom.xml b/pom.xml index 698ba5556c3..c34fcc4c5e7 100644 --- a/pom.xml +++ b/pom.xml @@ -143,7 +143,6 @@ true true true - true UTF-8 UTF-8 @@ -1000,7 +999,6 @@ false false false - false @@ -1030,8 +1028,6 @@ false false false - false - true false false false From 67b8359a78bd01488fa8bb5f7f376889160d5e9e Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Thu, 15 Feb 2018 12:56:42 -0600 Subject: [PATCH 4/4] NO-JIRA build fixes --- examples/features/sub-modules/tomcat/pom.xml | 1 + .../tomcat/sample/SendMessageController.java | 29 +++++++++---------- .../mqtt/clustered-queue-mqtt/pom.xml | 4 +-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/features/sub-modules/tomcat/pom.xml b/examples/features/sub-modules/tomcat/pom.xml index f04fd619001..edaebff2559 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 eb36179bddf..67807d458f2 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 @@ @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 374d7039316..190cfbe1371 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