summaryrefslogtreecommitdiff
path: root/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
commitc98ca20ecbf084c24918607f83b2d9208cedb7c6 (patch)
treeada6ba15490eccbd9ce70be5888eba3d7677b740 /java
parent01da1adfc66dc5aa5651cd09c85f0be8d222c721 (diff)
downloadqpid-python-c98ca20ecbf084c24918607f83b2d9208cedb7c6.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/qpid@1622217 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java b/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java
index f321b4e8e0..b76313fb35 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java
+++ b/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 :