qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject [qpid-broker-j] 03/03: NO-JIRA: Stop running some tests from Logback1027WorkaroundTurboFilterTest with IBM JDK
Date Wed, 06 Mar 2019 16:15:32 GMT
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit a7296abbdb1f89ff0deddd66b308da6927f6ad9a
Author: Alex Rudyy <orudyy@apache.org>
AuthorDate: Wed Mar 6 16:15:06 2019 +0000

    NO-JIRA: Stop running some tests from Logback1027WorkaroundTurboFilterTest with IBM JDK
---
 .../Logback1027WorkaroundTurboFilterTest.java      | 44 ++++++++++++++--------
 1 file changed, 28 insertions(+), 16 deletions(-)

diff --git a/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/Logback1027WorkaroundTurboFilterTest.java
b/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/Logback1027WorkaroundTurboFilterTest.java
index 84ab2f3..2fa44b2 100644
--- a/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/Logback1027WorkaroundTurboFilterTest.java
+++ b/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/Logback1027WorkaroundTurboFilterTest.java
@@ -64,18 +64,24 @@ public class Logback1027WorkaroundTurboFilterTest extends QpidTestCase
 
     public void testSuppressedExceptionRecursion()
     {
-        Exception e1 = new Exception();
-        Exception e2 = new Exception();
-        e2.addSuppressed(e1);
-        e1.addSuppressed(e2);
+        // https://www.ibm.com/developerworks/community/forums/html/topic?id=8482d948-665c-47a2-862e-457e49ac71a4&ps=25
+        if (getJvmVendor() != JvmVendor.IBM)
+        {
+            //QPID-7955 Behaviourial difference between the IBM JDK and the Open JDK
 
-        final FilterReply reply = doDecide(e1);
-        assertEquals(FilterReply.DENY, reply);
+            Exception e1 = new Exception();
+            Exception e2 = new Exception();
+            e2.addSuppressed(e1);
+            e1.addSuppressed(e2);
+
+            final FilterReply reply = doDecide(e1);
+            assertEquals(FilterReply.DENY, reply);
 
-        final List<ILoggingEvent> events = _snoopingAppender.getEvents();
-        assertEquals(1, events.size());
+            final List<ILoggingEvent> events = _snoopingAppender.getEvents();
+            assertEquals(1, events.size());
 
-        assertLoggingEvent(events.get(0));
+            assertLoggingEvent(events.get(0));
+        }
     }
 
     private void assertLoggingEvent(final ILoggingEvent loggingEvent)
@@ -89,14 +95,20 @@ public class Logback1027WorkaroundTurboFilterTest extends QpidTestCase
 
     public void testInitCauseRecursion() throws Exception
     {
-        Exception e1 = new Exception();
-        Exception e2 = new Exception();
-        e2.initCause(e1);
-        e1.initCause(e2);
+        // https://www.ibm.com/developerworks/community/forums/html/topic?id=8482d948-665c-47a2-862e-457e49ac71a4&ps=25
+        if (getJvmVendor() != JvmVendor.IBM)
+        {
+            //QPID-7955 Behaviourial difference between the IBM JDK and the Open JDK
 
-        final FilterReply reply = doDecide(e1);
-        assertEquals(FilterReply.DENY, reply);
-        assertEquals(1, _snoopingAppender.getEvents().size());
+            Exception e1 = new Exception();
+            Exception e2 = new Exception();
+            e2.initCause(e1);
+            e1.initCause(e2);
+
+            final FilterReply reply = doDecide(e1);
+            assertEquals(FilterReply.DENY, reply);
+            assertEquals(1, _snoopingAppender.getEvents().size());
+        }
     }
 
     public void testNoRecursion()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message