From ddf70ac450cb4a108fa7a0889d710ac743487d7a Mon Sep 17 00:00:00 2001 From: Alex Black Date: Mon, 3 Feb 2020 22:18:01 +1100 Subject: [PATCH] Avoid double printing of start/stop test in a few cases (#210) Signed-off-by: AlexDBlack --- .../src/test/java/org/nd4j/linalg/BaseNd4jTest.java | 4 +--- .../nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java | 2 -- .../src/test/java/org/nd4j/linalg/Nd4jTestsComparisonC.java | 2 -- .../test/java/org/nd4j/linalg/Nd4jTestsComparisonFortran.java | 2 -- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/BaseNd4jTest.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/BaseNd4jTest.java index e5a30b65b..0c2cb7a95 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/BaseNd4jTest.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/BaseNd4jTest.java @@ -81,10 +81,8 @@ public abstract class BaseNd4jTest extends BaseND4JTest { return ret; } - @Override @Before - public void beforeTest(){ - super.beforeTest(); + public void beforeTest2(){ Nd4j.factory().setOrder(ordering()); } diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java index 91cec2a5c..d96c0ed31 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java @@ -138,7 +138,6 @@ public class Nd4jTestsC extends BaseNd4jTest { @Before public void before() throws Exception { - super.beforeTest(); Nd4j.setDataType(DataType.DOUBLE); Nd4j.getRandom().setSeed(123); Nd4j.getExecutioner().enableDebugMode(false); @@ -147,7 +146,6 @@ public class Nd4jTestsC extends BaseNd4jTest { @After public void after() throws Exception { - super.afterTest(); Nd4j.setDataType(initialType); } diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonC.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonC.java index 946da0fb3..e8ce1202c 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonC.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonC.java @@ -57,13 +57,11 @@ public class Nd4jTestsComparisonC extends BaseNd4jTest { @Before public void before() throws Exception { - super.beforeTest(); DataTypeUtil.setDTypeForContext(DataType.DOUBLE); } @After public void after() throws Exception { - super.afterTest(); DataTypeUtil.setDTypeForContext(initialType); } diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonFortran.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonFortran.java index ef32c1f99..df929bbae 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonFortran.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsComparisonFortran.java @@ -58,7 +58,6 @@ public class Nd4jTestsComparisonFortran extends BaseNd4jTest { @Before public void before() throws Exception { - super.beforeTest(); DataTypeUtil.setDTypeForContext(DataType.DOUBLE); Nd4j.getRandom().setSeed(SEED); @@ -66,7 +65,6 @@ public class Nd4jTestsComparisonFortran extends BaseNd4jTest { @After public void after() throws Exception { - super.afterTest(); DataTypeUtil.setDTypeForContext(initialType); }