summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2009-05-22 16:25:04 +0000
committerAidan Skinner <aidan@apache.org>2009-05-22 16:25:04 +0000
commita7bce10c74927508804b6a025b8ad54f16f78f8f (patch)
tree1bac9e810a953abae3430b74a24ba74ca0a28786
parent7b7240f49e9ea7b13cf1b8dae388d3cf9f651a53 (diff)
downloadqpid-python-a7bce10c74927508804b6a025b8ad54f16f78f8f.tar.gz
Use alert level in the config file, don't try to set one (since that won't always work. *sigh*). Need a test-config really.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@777601 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java10
1 files changed, 6 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 3befc8d327..57d881d88c 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
@@ -46,6 +46,7 @@ public class AlertingTest extends QpidTestCase
private MessageConsumer _consumer; // Never read, but does need to be here to create the destination.
private File _logfile;
private XMLConfiguration _configuration;
+ private int _numMessages;
public void setUp() throws Exception
{
@@ -63,12 +64,13 @@ public class AlertingTest extends QpidTestCase
}
_configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".store.class", storeClass.getName());
- _configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".queues.maximumMessageCount", 2);
+ _numMessages = 5000;
File tmpFile = File.createTempFile("configFile", "test");
tmpFile.deleteOnExit();
_configuration.save(tmpFile);
_configFile = tmpFile;
+
if (_outputFile != null)
{
@@ -82,7 +84,7 @@ public class AlertingTest extends QpidTestCase
appender.setFile(_logfile.getAbsolutePath());
appender.setImmediateFlush(true);
Logger.getRootLogger().addAppender(appender);
- _logfile.deleteOnExit();
+ //_logfile.deleteOnExit();
}
// Then we do the normal setup stuff like starting the broker, getting a connection etc.
@@ -123,14 +125,14 @@ public class AlertingTest extends QpidTestCase
public void testAlertingReallyWorks() throws Exception
{
// Send 5 messages, make sure that the alert was fired properly.
- sendMessage(_session, _destination, 4);
+ sendMessage(_session, _destination, _numMessages + 1);
boolean found = wasAlertFired();
assertTrue("no alert generated in "+_logfile.getAbsolutePath(), found);
}
public void testAlertingReallyWorksWithRestart() throws Exception
{
- sendMessage(_session, _destination, 4);
+ sendMessage(_session, _destination, _numMessages + 1);
stopBroker();
(new FileOutputStream(_logfile)).getChannel().truncate(0);
startBroker();