diff options
| author | Aidan Skinner <aidan@apache.org> | 2009-05-26 14:41:05 +0000 |
|---|---|---|
| committer | Aidan Skinner <aidan@apache.org> | 2009-05-26 14:41:05 +0000 |
| commit | fdba1a9ed5074286fe58ebf9be543bbebea0bb79 (patch) | |
| tree | de313f1a35d28665ec994588a0372a7c3eaf5080 /java/systests/src | |
| parent | 8e4990b96258dfb574b816988cb07823f1a7ef82 (diff) | |
| download | qpid-python-fdba1a9ed5074286fe58ebf9be543bbebea0bb79.tar.gz | |
Don't delete derby.log. Use virtualhost-systests.xml for testing purpouses. Minor code cleanup in AlertingTest.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@778723 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java b/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java index 57d881d88c..5552355416 100644 --- a/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java +++ b/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java @@ -55,16 +55,21 @@ public class AlertingTest extends QpidTestCase _configuration = new XMLConfiguration(_configFile); _configuration.setProperty("management.enabled", "false"); Class storeClass = DerbyMessageStore.class; + Class bdb = null; try { - Class bdb = Class.forName("org.apache.qpid.store.berkleydb.BDBMessageStore"); + bdb = Class.forName("org.apache.qpid.store.berkleydb.BDBMessageStore"); } catch (ClassNotFoundException e) { // No BDB store, we'll use Derby instead. } + if (bdb != null) + { + storeClass = bdb; + } _configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".store.class", storeClass.getName()); - _numMessages = 5000; + _numMessages = 50; File tmpFile = File.createTempFile("configFile", "test"); tmpFile.deleteOnExit(); @@ -105,14 +110,12 @@ public class AlertingTest extends QpidTestCase // just in case the logfile takes a while to flush. BufferedReader reader = new BufferedReader(new FileReader(_logfile)); boolean found = false; - int lineCount = 0; long endtime = System.currentTimeMillis()+5000; while (!found && System.currentTimeMillis() < endtime) { while (reader.ready()) { String line = reader.readLine(); - lineCount++; if (line.contains("MESSAGE_COUNT_ALERT")) { found = true; |
