activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r826700 - in /activemq/trunk/activemq-core/src/test: java/org/apache/activemq/ java/org/apache/activemq/bugs/ java/org/apache/activemq/security/ resources/org/apache/activemq/security/
Date Mon, 19 Oct 2009 15:28:30 GMT
Author: gtully
Date: Mon Oct 19 15:28:29 2009
New Revision: 826700

URL: http://svn.apache.org/viewvc?rev=826700&view=rev
Log:
resolve some timing issues with slow tests and potential jmx port clash

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
    activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java?rev=826700&r1=826699&r2=826700&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
Mon Oct 19 15:28:29 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/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java?rev=826700&r1=826699&r2=826700&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java Mon
Oct 19 15:28:29 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/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java?rev=826700&r1=826699&r2=826700&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
Mon Oct 19 15:28:29 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/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml?rev=826700&r1=826699&r2=826700&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
(original)
+++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
Mon Oct 19 15:28:29 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>



Mime
View raw message