commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [1/2] [math] Fixed failing unit test.
Date Fri, 22 Apr 2016 01:39:36 GMT
Repository: commons-math
Updated Branches:
  refs/heads/develop baae2a6f3 -> f16d5b172


Fixed failing unit test.

Source of failure was MATH-1340: Expected exception is now wrapped in another exception.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/84143c46
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/84143c46
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/84143c46

Branch: refs/heads/develop
Commit: 84143c462986417ccfc5e8c05481e983cf668e2c
Parents: baae2a6
Author: Gilles <erans@apache.org>
Authored: Fri Apr 22 03:01:33 2016 +0200
Committer: Gilles <erans@apache.org>
Committed: Fri Apr 22 03:01:33 2016 +0200

----------------------------------------------------------------------
 .../apache/commons/math4/random/JDKRandomAdaptorTest.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/84143c46/src/test/java/org/apache/commons/math4/random/JDKRandomAdaptorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/random/JDKRandomAdaptorTest.java b/src/test/java/org/apache/commons/math4/random/JDKRandomAdaptorTest.java
index 5ba68c7..7360a88 100644
--- a/src/test/java/org/apache/commons/math4/random/JDKRandomAdaptorTest.java
+++ b/src/test/java/org/apache/commons/math4/random/JDKRandomAdaptorTest.java
@@ -80,9 +80,14 @@ public class JDKRandomAdaptorTest {
         Assert.assertEquals(withoutReseed, withReseed, 0);
     }
 
-    @Test(expected=MathUnsupportedOperationException.class)
+    @Test
     public void testSerializeIsNotSupported() {
-        TestUtils.serializeAndRecover(new JDKRandomAdaptor(RandomSource.create(RandomSource.WELL_512_A)));
+        try {
+            TestUtils.serializeAndRecover(new JDKRandomAdaptor(RandomSource.create(RandomSource.WELL_512_A)));
+        } catch (Exception e) {
+            Throwable cause = e.getCause();
+            Assert.assertTrue(cause instanceof MathUnsupportedOperationException);
+        }
     }
 
     /**


Mime
View raw message