deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [1/2] deltaspike git commit: trying to track down stochastic JMX test errors
Date Mon, 08 May 2017 09:31:08 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 5c04cec3b -> f5ba10bb7


trying to track down stochastic JMX test errors


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/906049d8
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/906049d8
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/906049d8

Branch: refs/heads/master
Commit: 906049d833698b34e8afb8fe2ef8d7e92dec9f5b
Parents: 5c04cec
Author: Mark Struberg <struberg@apache.org>
Authored: Fri May 5 12:51:34 2017 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Fri May 5 12:51:34 2017 +0200

----------------------------------------------------------------------
 .../test/core/impl/jmx/SimpleRegistrationTest.java           | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/906049d8/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/jmx/SimpleRegistrationTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/jmx/SimpleRegistrationTest.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/jmx/SimpleRegistrationTest.java
index c287192..8bcaa2c 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/jmx/SimpleRegistrationTest.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/jmx/SimpleRegistrationTest.java
@@ -18,10 +18,12 @@
  */
 package org.apache.deltaspike.test.core.impl.jmx;
 
+import org.junit.Assert;
 import org.junit.Test;
 
 import javax.inject.Inject;
 import javax.management.Attribute;
+import javax.management.MBeanInfo;
 import javax.management.MBeanOperationInfo;
 import javax.management.MBeanParameterInfo;
 import javax.management.MBeanServer;
@@ -73,7 +75,11 @@ public abstract class SimpleRegistrationTest {
         assertEquals(1, notifications.size());
         assertEquals(10L, notifications.iterator().next().getSequenceNumber());
 
-        MBeanOperationInfo[] operations = server.getMBeanInfo(on).getOperations();
+        MBeanInfo mBeanInfo = server.getMBeanInfo(on);
+        Assert.assertNotNull(mBeanInfo);
+        MBeanOperationInfo[] operations = mBeanInfo.getOperations();
+        Assert.assertNotNull(operations);
+        Assert.assertTrue(operations.length > 0);
         MBeanParameterInfo parameterInfo = operations[0].getSignature()[0];
         assertEquals("multiplier", parameterInfo.getName());
         assertEquals("the multiplier", parameterInfo.getDescription());


Mime
View raw message