activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r904474 - /activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
Date Fri, 29 Jan 2010 11:59:28 GMT
Author: dejanb
Date: Fri Jan 29 11:59:26 2010
New Revision: 904474

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

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

Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java?rev=904474&r1=904473&r2=904474&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
Fri Jan 29 11:59:26 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