karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5845) JMXSecurityTest.testJMXSecurityAsManager is flaky
Date Fri, 17 Aug 2018 05:38:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583381#comment-16583381
] 

ASF GitHub Bot commented on KARAF-5845:
---------------------------------------

jbonofre closed pull request #598: [KARAF-5845] Avoid race condition in JMXSecurityTest
URL: https://github.com/apache/karaf/pull/598
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/itests/test/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java b/itests/test/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java
index 5a5a0add5a..ee7630e538 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java
@@ -368,6 +368,12 @@ private void testKarafConfigAdminMBean(MBeanServerConnection connection,
String
         newProps.put("d.e.f", "def");
         assertJmxInvoke(shouldSucceed, connection, mbean, "update", new Object [] {pid, newProps},
new String [] {String.class.getName(), Map.class.getName()});
         assertJmxInvoke(shouldSucceed, connection, mbean, "deleteProperty", new Object []
{pid, "d.e.f"}, new String [] {String.class.getName(), String.class.getName()});
+        // just put some delay to avoid KARAF-5845
+        try {
+            Thread.sleep(3000);
+        } catch (Throwable t) {
+            // nothing to do
+        }
         Map<?, ?> m3 = (Map<?, ?>) connection.invoke(mbean, "listProperties",
new Object [] {pid}, new String [] {String.class.getName()});
         if (shouldSucceed) {
             assertEquals("abc", m3.get("a.b.c"));


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> JMXSecurityTest.testJMXSecurityAsManager is flaky
> -------------------------------------------------
>
>                 Key: KARAF-5845
>                 URL: https://issues.apache.org/jira/browse/KARAF-5845
>             Project: Karaf
>          Issue Type: Test
>          Components: karaf-test
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.2.1
>
>
> {{JMXSecurityTest.testJMXSecurityAsManager}} randomly fails on Jenkins:
> {code}
> java.lang.AssertionError: expected:<y> but was:<null>
> 	at org.apache.karaf.itests.JMXSecurityTest.testKarafConfigAdminMBean(JMXSecurityTest.java:356)
> 	at org.apache.karaf.itests.JMXSecurityTest.testKarafConfigAdminMBean(JMXSecurityTest.java:337)
> 	at org.apache.karaf.itests.JMXSecurityTest.testJMXSecurityAsManager(JMXSecurityTest.java:164)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message