activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r904468 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
Date Fri, 29 Jan 2010 11:42:48 GMT
Author: dejanb
Date: Fri Jan 29 11:42:46 2010
New Revision: 904468

URL: http://svn.apache.org/viewvc?rev=904468&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2507 - improving test, avoiding false positives

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java?rev=904468&r1=904467&r2=904468&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
Fri Jan 29 11:42:46 2010
@@ -55,8 +55,10 @@
 	                    logger.info("Done sending..");
 	                } catch (JMSException e) {
 	                    e.printStackTrace();
-	                	exceptionCount.incrementAndGet();
-	                	return;
+	                    if (e instanceof ResourceAllocationException) {
+	                        exceptionCount.incrementAndGet();
+	                    }
+	                    return;
 	                }
 	            }
 	        };
@@ -66,7 +68,7 @@
 	        producerThread.join(30000);
 	        cx.close();
 	        // We should have a few timeout exceptions as memory store will fill up
-	        assertTrue(exceptionCount.get() > 0);
+	        assertTrue("No exception from the broker", exceptionCount.get() > 0);
 	    }
 
 	    protected void setUp() throws Exception {



Mime
View raw message