This closes #1881
This commit is contained in:
commit
d83758e1aa
|
@ -380,7 +380,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
|
|||
if (error) {
|
||||
ActiveMQUtilLogger.LOGGER.failedToReadFromStream(inputLine);
|
||||
} else {
|
||||
logger.trace(inputLine);
|
||||
logger.debug(inputLine);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -34,6 +34,7 @@ under the License.
|
|||
<name>Artemis Tomcat JNDI Resources Example</name>
|
||||
|
||||
<properties>
|
||||
<activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<projectBaseUri>${project.baseUri}</projectBaseUri>
|
||||
<java.version>1.6</java.version>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -22,8 +22,8 @@ under the License.
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq.examples.clustered</groupId>
|
||||
<artifactId>broker-clustered</artifactId>
|
||||
<groupId>org.apache.activemq.examples.mqtt</groupId>
|
||||
<artifactId>mqtt-examples</artifactId>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
|
11
pom.xml
11
pom.xml
|
@ -143,7 +143,6 @@
|
|||
<skipConcurrentTests>true</skipConcurrentTests>
|
||||
<skipRestTests>true</skipRestTests>
|
||||
<skipActiveMQ5Tests>true</skipActiveMQ5Tests>
|
||||
<skipExtraTests>true</skipExtraTests>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
@ -186,6 +185,10 @@
|
|||
|
||||
<netty-transport-native-epoll-classifier>linux-x86_64</netty-transport-native-epoll-classifier>
|
||||
<netty-transport-native-kqueue-classifier>osx-x86_64</netty-transport-native-kqueue-classifier>
|
||||
|
||||
<!-- Ignore failed tests by default because there are "known" failures in the full test-suite.
|
||||
This will be set to false for the "fast-tests" profile as none of those tests should fail. -->
|
||||
<testFailureIgnore>true</testFailureIgnore>
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
|
@ -996,7 +999,6 @@
|
|||
<skipExtraTests>false</skipExtraTests>
|
||||
<skipStyleCheck>false</skipStyleCheck>
|
||||
<skipLicenseCheck>false</skipLicenseCheck>
|
||||
<skipExtraTests>false</skipExtraTests>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
|
@ -1026,11 +1028,10 @@
|
|||
<skipJmsTests>false</skipJmsTests>
|
||||
<skipJoramTests>false</skipJoramTests>
|
||||
<skipConcurrentTests>false</skipConcurrentTests>
|
||||
<skipRestTests>false</skipRestTests>
|
||||
<skipExtraTests>true</skipExtraTests>
|
||||
<skipStyleCheck>false</skipStyleCheck>
|
||||
<skipLicenseCheck>false</skipLicenseCheck>
|
||||
<skipCompatibilityTests>false</skipCompatibilityTests>
|
||||
<testFailureIgnore>false</testFailureIgnore>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
|
@ -1419,7 +1420,7 @@
|
|||
<version>2.18.1</version>
|
||||
<configuration>
|
||||
<forkMode>once</forkMode>
|
||||
<testFailureIgnore>true</testFailureIgnore>
|
||||
<testFailureIgnore>${testFailureIgnore}</testFailureIgnore>
|
||||
<runOrder>alphabetical</runOrder>
|
||||
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||
<argLine>${activemq-surefire-argline}</argLine>
|
||||
|
|
Loading…
Reference in New Issue