summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-09-03 10:46:38 +0000
committerKeith Wall <kwall@apache.org>2014-09-03 10:46:38 +0000
commitfcf24c878d50754a80b85c151970776af8c5fe2c (patch)
tree743fa3be4809f03eb78361e635f3b4e28554fb6b /qpid/java
parentc314d42848570748b339a71303a8de8288cc2923 (diff)
downloadqpid-python-fcf24c878d50754a80b85c151970776af8c5fe2c.tar.gz
NO-JIRA: [Java System Tests] ConsumerLoggingTest: Temporary code in test class to better understand a failure in a CI environment.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622217 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/qpid/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java b/qpid/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java
index f321b4e8e0..b76313fb35 100644
--- a/qpid/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java
+++ b/qpid/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java
@@ -22,6 +22,8 @@ package org.apache.qpid.server.logging;
import javax.jms.QueueBrowser;
import junit.framework.AssertionFailedError;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
import org.apache.qpid.client.AMQConnection;
@@ -295,8 +297,17 @@ public class ConsumerLoggingTest extends AbstractTestLogging
*/
public void testSubscriptionSuspend() throws Exception, IOException
{
+ // Temporary code to better understand a failure in a CI environment.
+ Logger subscriptionLogger = Logger.getLogger("qpid.message.subscription.state");
+ getLogger().debug("Subscription Logger: level " + subscriptionLogger.getLevel() + " effective level " + subscriptionLogger.getEffectiveLevel());
+ if (subscriptionLogger.getEffectiveLevel() == Level.OFF)
+ {
+ getLogger().debug("Resetting subscription logger level to INFO");
+ subscriptionLogger.setLevel(Level.INFO);
+ }
+
//Close session with large prefetch
- _connection.createSession(false, Session.AUTO_ACKNOWLEDGE).close();
+ _session.close();
int PREFETCH = 15;
@@ -321,7 +332,7 @@ public class ConsumerLoggingTest extends AbstractTestLogging
_session.commit();
// Retreive the first message, and start the flow of messages
Message msg = consumer.receive(1000);
- assertNotNull("First message not retreived", msg);
+ assertNotNull("First message not retrieved", msg);
_session.commit();
// Drain the queue to ensure there is time for the ACTIVE log message
@@ -349,7 +360,7 @@ public class ConsumerLoggingTest extends AbstractTestLogging
// Validation expects three messages.
// The Actor can be any one of the following depending on the exactly what is going on on the broker.
// Ideally we would test that we can get all of them but setting up
- // the timing to do this in a consistent way is not benefitial.
+ // the timing to do this in a consistent way is not beneficial.
// Ensuring the State is as expected is sufficient.
// INFO - MESSAGE [vh(/test)/qu(example.queue)] [sub:6(qu(example.queue))] SUB-1003 : State :
// INFO - MESSAGE [con:6(guest@anonymous(26562441)/test)/ch:3] [sub:6(qu(example.queue))] SUB-1003 : State :