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 | cff7f8e8b36ee19947171a36a304eaa98dcccf8a (patch) | |
| tree | 17dfde7c706f6b7bfee347d0444ce0ed580e6c1f /qpid/java/systests | |
| parent | 51e4486d1ec5f1a1da44d580cbc2a90bdca16d00 (diff) | |
| download | qpid-python-cff7f8e8b36ee19947171a36a304eaa98dcccf8a.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@778723 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java index 57d881d88c..5552355416 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java +++ b/qpid/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; |
