You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2010/01/29 12:42:48 UTC
svn commit: r904468 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
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 {