You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2009/10/19 17:38:00 UTC
svn commit: r826705 - in
/activemq/branches/activemq-5.3/activemq-core/src/test:
java/org/apache/activemq/ java/org/apache/activemq/bugs/
java/org/apache/activemq/security/ resources/org/apache/activemq/security/
Author: gtully
Date: Mon Oct 19 15:38:00 2009
New Revision: 826705
URL: http://svn.apache.org/viewvc?rev=826705&view=rev
Log:
merge from trunk: r826696 - resolve some timing issues with slow tests and potential jmx port clash
Modified:
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
activemq/branches/activemq-5.3/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java?rev=826705&r1=826704&r2=826705&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java Mon Oct 19 15:38:00 2009
@@ -79,9 +79,9 @@
Message msg = senderSession.createTextMessage("test");
for (int i =0; i< 10000;i++) {
producer.send(msg);
- Assert.assertNotNull("null on iteration: " + i, highConsumer.receive(200));
+ Assert.assertNotNull("null on iteration: " + i, highConsumer.receive(500));
}
- Assert.assertNull( lowConsumer.receive(500));
+ Assert.assertNull(lowConsumer.receive(2000));
} finally {
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java?rev=826705&r1=826704&r2=826705&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java Mon Oct 19 15:38:00 2009
@@ -102,7 +102,7 @@
c1.start();
}
- assertTrue(started.await(5, TimeUnit.SECONDS));
+ assertTrue(started.await(10, TimeUnit.SECONDS));
Thread producer = new Thread() {
@Override
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java?rev=826705&r1=826704&r2=826705&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java Mon Oct 19 15:38:00 2009
@@ -48,16 +48,16 @@
public void tearDown() throws Exception {
}
- public void testMoveMessages() throws Exception {
- JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi");
- JMXConnector connector = JMXConnectorFactory.connect(url, null);
- connector.connect();
- MBeanServerConnection connection = connector.getMBeanServerConnection();
- ObjectName name = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=TEST.Q");
- QueueViewMBean queueMbean = (QueueViewMBean) MBeanServerInvocationHandler.newProxyInstance(connection, name, QueueViewMBean.class, true);
- String msgId = queueMbean.sendTextMessage("test", "system", "manager");
- queueMbean.moveMessageTo(msgId, "TEST1.Q");
- }
+ public void testMoveMessages() throws Exception {
+ JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi");
+ JMXConnector connector = JMXConnectorFactory.connect(url, null);
+ connector.connect();
+ MBeanServerConnection connection = connector.getMBeanServerConnection();
+ ObjectName name = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=TEST.Q");
+ QueueViewMBean queueMbean = (QueueViewMBean) MBeanServerInvocationHandler.newProxyInstance(connection, name, QueueViewMBean.class, true);
+ String msgId = queueMbean.sendTextMessage("test", "system", "manager");
+ queueMbean.moveMessageTo(msgId, "TEST1.Q");
+ }
protected BrokerService createBroker() throws Exception {
return createBroker("org/apache/activemq/security/simple-auth-broker.xml");
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml?rev=826705&r1=826704&r2=826705&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml Mon Oct 19 15:38:00 2009
@@ -22,6 +22,10 @@
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
+ <!-- Use a non-default port in case the default port is in use -->
+ <managementContext>
+ <managementContext connectorPort="1199"/>
+ </managementContext>
<destinations>
<queue physicalName="TEST.Q" />
@@ -62,4 +66,4 @@
</plugins>
</broker>
-</beans>
\ No newline at end of file
+</beans>