You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2017/02/14 23:19:13 UTC
incubator-systemml git commit: [SYSTEMML-1235] Fix gnmf mlcontext
test (missing spark context close)
Repository: incubator-systemml
Updated Branches:
refs/heads/master 3353bf9ec -> d58c78750
[SYSTEMML-1235] Fix gnmf mlcontext test (missing spark context close)
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/d58c7875
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/d58c7875
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/d58c7875
Branch: refs/heads/master
Commit: d58c7875081f49f8cb74a5bb94a083adad83a1bb
Parents: 3353bf9
Author: Matthias Boehm <mb...@gmail.com>
Authored: Tue Feb 14 15:19:02 2017 -0800
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Tue Feb 14 15:19:21 2017 -0800
----------------------------------------------------------------------
.../functions/mlcontext/GNMFTest.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d58c7875/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/GNMFTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/GNMFTest.java b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/GNMFTest.java
index a826443..eeeb925 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/GNMFTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/GNMFTest.java
@@ -57,6 +57,8 @@ import org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex;
import org.apache.sysml.runtime.util.MapReduceTool;
import org.apache.sysml.test.integration.AutomatedTestBase;
import org.apache.sysml.test.utils.TestUtils;
+import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -258,6 +260,24 @@ public class GNMFTest extends AutomatedTestBase
}
}
+ @After
+ public void tearDown() {
+ super.tearDown();
+ }
+
+ @AfterClass
+ public static void tearDownClass() {
+ // stop spark context to allow single jvm tests (otherwise the
+ // next test that tries to create a SparkContext would fail)
+ sc.stop();
+ sc = null;
+ conf = null;
+
+ // clear status mlcontext and spark exec context
+ ml.close();
+ ml = null;
+ }
+
public static class StringToMatrixEntry implements Function<String, MatrixEntry> {
private static final long serialVersionUID = 7456391906436606324L;