This is an automated email from the ASF dual-hosted git repository. baunsgaard pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/systemds.git
commit adb50434184c5a706cb268c63e3ad06738603d85 Author: baunsgaard <[email protected]> AuthorDate: Thu Nov 12 19:02:33 2020 +0100 [MINOR] Use Log4j in overwriting config test --- .../sysds/test/functions/codegen/CellwiseTmplTest.java | 10 +++++++--- .../sysds/test/functions/codegen/DAGCellwiseTmplTest.java | 11 ++++++++--- .../apache/sysds/test/functions/codegen/MiscPatternTest.java | 11 ++++++++--- .../sysds/test/functions/codegen/MultiAggTmplTest.java | 10 +++++++--- .../sysds/test/functions/codegen/OuterProdTmplTest.java | 9 ++++++--- .../apache/sysds/test/functions/codegen/RowAggTmplTest.java | 12 ++++++++---- .../test/functions/codegen/RowConv2DOperationsTest.java | 10 +++++++--- .../test/functions/codegen/RowVectorComparisonTest.java | 10 +++++++--- .../sysds/test/functions/codegen/SparseSideInputTest.java | 10 +++++++--- .../sysds/test/functions/codegen/SumProductChainTest.java | 10 +++++++--- .../sysds/test/functions/federated/io/FederatedSSLTest.java | 6 ++++-- src/test/resources/log4j.properties | 2 +- 12 files changed, 77 insertions(+), 34 deletions(-) diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/CellwiseTmplTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/CellwiseTmplTest.java index 6f887ce..5fac4a9 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/CellwiseTmplTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/CellwiseTmplTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,13 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class CellwiseTmplTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(CellwiseTmplTest.class.getName()); + private static final String TEST_NAME = "cellwisetmpl"; private static final String TEST_NAME1 = TEST_NAME+1; private static final String TEST_NAME2 = TEST_NAME+2; @@ -539,7 +543,7 @@ public class CellwiseTmplTest extends AutomatedTestBase protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. File TEST_CONF_FILE = new File(SCRIPT_DIR + TEST_DIR, TEST_CONF); - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/DAGCellwiseTmplTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/DAGCellwiseTmplTest.java index d74fc46..9c65802 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/DAGCellwiseTmplTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/DAGCellwiseTmplTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,14 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class DAGCellwiseTmplTest extends AutomatedTestBase { + + private static final Log LOG = LogFactory.getLog(DAGCellwiseTmplTest.class.getName()); + private static final String TEST_NAME1 = "DAGcellwisetmpl1"; private static final String TEST_NAME2 = "DAGcellwisetmpl2"; private static final String TEST_NAME3 = "DAGcellwisetmpl3"; @@ -160,7 +165,7 @@ public class DAGCellwiseTmplTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/MiscPatternTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/MiscPatternTest.java index eb02561..7d40f4b 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/MiscPatternTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/MiscPatternTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,14 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class MiscPatternTest extends AutomatedTestBase { + + private static final Log LOG = LogFactory.getLog(MiscPatternTest.class.getName()); + private static final String TEST_NAME = "miscPattern"; private static final String TEST_NAME1 = TEST_NAME+"1"; //Y + (X * U%*%t(V)) overlapping cell-outer private static final String TEST_NAME2 = TEST_NAME+"2"; //multi-agg w/ large common subexpression @@ -169,7 +174,7 @@ public class MiscPatternTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/MultiAggTmplTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/MultiAggTmplTest.java index 0614062..4eb65ef 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/MultiAggTmplTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/MultiAggTmplTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,13 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class MultiAggTmplTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(MultiAggTmplTest.class.getName()); + private static final String TEST_NAME = "multiAggPattern"; private static final String TEST_NAME1 = TEST_NAME+"1"; //min(X>7), max(X>7) private static final String TEST_NAME2 = TEST_NAME+"2"; //sum(X>7), sum((X>7)^2) @@ -206,7 +210,7 @@ public class MultiAggTmplTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/OuterProdTmplTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/OuterProdTmplTest.java index 526afa7..d6c8727 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/OuterProdTmplTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/OuterProdTmplTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,12 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class OuterProdTmplTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(OuterProdTmplTest.class.getName()); private static final String TEST_NAME1 = "wdivmm"; private static final String TEST_NAME2 = "wdivmmRight"; private static final String TEST_NAME3 = "wsigmoid"; @@ -310,7 +313,7 @@ public class OuterProdTmplTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/RowAggTmplTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/RowAggTmplTest.java index 14774a5..2ec220f 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/RowAggTmplTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/RowAggTmplTest.java @@ -22,19 +22,23 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; -import org.apache.sysds.lops.RightIndex; import org.apache.sysds.lops.LopProperties.ExecType; +import org.apache.sysds.lops.RightIndex; import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class RowAggTmplTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(RowAggTmplTest.class.getName()); + private static final String TEST_NAME = "rowAggPattern"; private static final String TEST_NAME1 = TEST_NAME+"1"; //t(X)%*%(X%*%(lamda*v)) private static final String TEST_NAME2 = TEST_NAME+"2"; //t(X)%*%(lamda*(X%*%v)) @@ -861,7 +865,7 @@ public class RowAggTmplTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/RowConv2DOperationsTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/RowConv2DOperationsTest.java index 6678f29..ecdbf5a 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/RowConv2DOperationsTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/RowConv2DOperationsTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,13 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class RowConv2DOperationsTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(RowConv2DOperationsTest.class.getName()); + private final static String TEST_NAME1 = "RowConv2DTest"; private final static String TEST_DIR = "functions/codegen/"; private final static String TEST_CLASS_DIR = TEST_DIR + RowConv2DOperationsTest.class.getSimpleName() + "/"; @@ -121,7 +125,7 @@ public class RowConv2DOperationsTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/RowVectorComparisonTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/RowVectorComparisonTest.java index 1ffa4ed..79f7ad4 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/RowVectorComparisonTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/RowVectorComparisonTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,13 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class RowVectorComparisonTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(RowVectorComparisonTest.class.getName()); + private static final String TEST_NAME1 = "rowComparisonEq"; private static final String TEST_NAME2 = "rowComparisonNeq"; private static final String TEST_NAME3 = "rowComparisonLte"; @@ -164,7 +168,7 @@ public class RowVectorComparisonTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/SparseSideInputTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/SparseSideInputTest.java index d3c6aa1..040e27d 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/SparseSideInputTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/SparseSideInputTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,13 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class SparseSideInputTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(SparseSideInputTest.class.getName()); + private static final String TEST_NAME = "SparseSideInput"; private static final String TEST_NAME1 = TEST_NAME+"1"; //row sum(X/rowSums(X)+Y) private static final String TEST_NAME2 = TEST_NAME+"2"; //cell sum(abs(X^2)+Y) @@ -189,7 +193,7 @@ public class SparseSideInputTest extends AutomatedTestBase protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. File f = new File(SCRIPT_DIR + TEST_DIR, TEST_CONF); - System.out.println("This test case overrides default configuration with " + f.getPath()); + LOG.info("This test case overrides default configuration with " + f.getPath()); return f; } } diff --git a/src/test/java/org/apache/sysds/test/functions/codegen/SumProductChainTest.java b/src/test/java/org/apache/sysds/test/functions/codegen/SumProductChainTest.java index 47183ec..3488600 100644 --- a/src/test/java/org/apache/sysds/test/functions/codegen/SumProductChainTest.java +++ b/src/test/java/org/apache/sysds/test/functions/codegen/SumProductChainTest.java @@ -22,8 +22,8 @@ package org.apache.sysds.test.functions.codegen; import java.io.File; import java.util.HashMap; -import org.junit.Assert; -import org.junit.Test; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types.ExecMode; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.lops.LopProperties.ExecType; @@ -31,9 +31,13 @@ import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; +import org.junit.Assert; +import org.junit.Test; public class SumProductChainTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(SumProductChainTest.class.getName()); + private static final String TEST_NAME1 = "SumProductChain"; private static final String TEST_NAME2 = "SumAdditionChain"; private static final String TEST_DIR = "functions/codegen/"; @@ -149,7 +153,7 @@ public class SumProductChainTest extends AutomatedTestBase @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/java/org/apache/sysds/test/functions/federated/io/FederatedSSLTest.java b/src/test/java/org/apache/sysds/test/functions/federated/io/FederatedSSLTest.java index 40029f6..1088b68 100644 --- a/src/test/java/org/apache/sysds/test/functions/federated/io/FederatedSSLTest.java +++ b/src/test/java/org/apache/sysds/test/functions/federated/io/FederatedSSLTest.java @@ -23,6 +23,8 @@ import java.io.File; import java.util.Arrays; import java.util.Collection; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.sysds.common.Types; import org.apache.sysds.runtime.controlprogram.caching.MatrixObject; import org.apache.sysds.runtime.meta.MatrixCharacteristics; @@ -38,8 +40,8 @@ import org.junit.runners.Parameterized; @RunWith(value = Parameterized.class) @net.jcip.annotations.NotThreadSafe public class FederatedSSLTest extends AutomatedTestBase { + private static final Log LOG = LogFactory.getLog(FederatedSSLTest.class.getName()); - // private static final Log LOG = LogFactory.getLog(FederatedReaderTest.class.getName()); // This test use the same scripts as the Federated Reader tests, just with SSL enabled. private final static String TEST_DIR = "functions/federated/io/"; private final static String TEST_NAME = "FederatedReaderTest"; @@ -135,7 +137,7 @@ public class FederatedSSLTest extends AutomatedTestBase { @Override protected File getConfigTemplateFile() { // Instrumentation in this test's output log to show custom configuration file used for template. - System.out.println("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); + LOG.info("This test case overrides default configuration with " + TEST_CONF_FILE.getPath()); return TEST_CONF_FILE; } } diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties index 1c43a37..6f16be0 100644 --- a/src/test/resources/log4j.properties +++ b/src/test/resources/log4j.properties @@ -24,7 +24,7 @@ log4j.rootLogger=ERROR,console log4j.logger.org.apache.sysds.api.DMLScript=OFF log4j.logger.org.apache.sysds.test=INFO log4j.logger.org.apache.sysds.test.AutomatedTestBase=ERROR -log4j.logger.org.apache.sysds=WARN +log4j.logger.org.apache.sysds=ERROR #log4j.logger.org.apache.sysds.hops.codegen.SpoofCompiler=TRACE log4j.logger.org.apache.sysds.runtime.compress.AbstractCompressedMatrixBlock=ERROR # log4j.logger.org.apache.sysds.runtime.instructions.fed=DEBUG
