Author: ritchiem
Date: 2008-05-20 12:10:15 -0400 (Tue, 20 May 2008)
New Revision: 2069
Modified:
store/branches/java/M2.1.x/java/bdbstore/src/test/java/org/etp/qpid/server/StoreContextRaceConditionTest.java
Log:
SCRCT does not exit. The failure ususally occurs in the first iteration so repeat 5 times
to ensure it is resolved. Ensured tearDown is called
Modified:
store/branches/java/M2.1.x/java/bdbstore/src/test/java/org/etp/qpid/server/StoreContextRaceConditionTest.java
===================================================================
---
store/branches/java/M2.1.x/java/bdbstore/src/test/java/org/etp/qpid/server/StoreContextRaceConditionTest.java 2008-05-20
14:45:12 UTC (rev 2068)
+++
store/branches/java/M2.1.x/java/bdbstore/src/test/java/org/etp/qpid/server/StoreContextRaceConditionTest.java 2008-05-20
16:10:15 UTC (rev 2069)
@@ -96,9 +96,14 @@
_queue = (Queue) _context.lookup("queue");
}
- public void tearDown()
+ public void tearDown() throws Exception
{
- System.setProperty(LOGGING_KEY, _loggingOriginal);
+ // Destroy the Broker
+ super.tearDown();
+ if (_loggingOriginal != null)
+ {
+ System.setProperty(LOGGING_KEY, _loggingOriginal);
+ }
}
protected static final String MESSAGE_ID_PROPERTY = "MessageIDProperty";
@@ -173,7 +178,7 @@
try
{
int run = 1;
- while (true)
+ while (run < 5)
{
try
{
@@ -215,8 +220,6 @@
sendMessages(50);
_logger.info("***** SENT TTL msgs");
- System.err.println("*********************************
Running test again (" + run +
- ")in attempt to cause race
condition.");
run++;
}
catch (JMSException e)
@@ -265,7 +268,7 @@
scrc.setUp();
scrc.test();
-// scrc.tearDown();
+ scrc.tearDown();
}
}
Show replies by date