https://issues.apache.org/activemq/browse/AMQ-2507 - improving test, avoiding false positives

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@904468 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-01-29 11:42:46 +00:00
parent 17cc428b21
commit fed9ac7955
1 changed files with 5 additions and 3 deletions

View File

@ -55,8 +55,10 @@ public class JmsTimeoutTest extends EmbeddedBrokerTestSupport {
logger.info("Done sending.."); logger.info("Done sending..");
} catch (JMSException e) { } catch (JMSException e) {
e.printStackTrace(); e.printStackTrace();
exceptionCount.incrementAndGet(); if (e instanceof ResourceAllocationException) {
return; exceptionCount.incrementAndGet();
}
return;
} }
} }
}; };
@ -66,7 +68,7 @@ public class JmsTimeoutTest extends EmbeddedBrokerTestSupport {
producerThread.join(30000); producerThread.join(30000);
cx.close(); cx.close();
// We should have a few timeout exceptions as memory store will fill up // 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 { protected void setUp() throws Exception {