diff --git a/src/test/java/org/apache/sysds/test/applications/nn/BaseTest.java b/src/test/java/org/apache/sysds/test/applications/nn/BaseTest.java index 2fa9f556793..f8b33fdc3eb 100644 --- a/src/test/java/org/apache/sysds/test/applications/nn/BaseTest.java +++ b/src/test/java/org/apache/sysds/test/applications/nn/BaseTest.java @@ -32,6 +32,11 @@ public abstract class BaseTest extends MLContextTestBase { private static final String ERROR_STRING = "ERROR:"; + public BaseTest() { + //disable debug and trace logging in mlcontext super class since + //the nn tests execute a lot of mini-batch operations + _enableTracing = false; + } protected void run(String name) { run(name, false); diff --git a/src/test/java/org/apache/sysds/test/functions/mlcontext/MLContextTestBase.java b/src/test/java/org/apache/sysds/test/functions/mlcontext/MLContextTestBase.java index 6b5df523f57..b21bcaf54c5 100644 --- a/src/test/java/org/apache/sysds/test/functions/mlcontext/MLContextTestBase.java +++ b/src/test/java/org/apache/sysds/test/functions/mlcontext/MLContextTestBase.java @@ -66,7 +66,8 @@ public abstract class MLContextTestBase extends AutomatedTestBase { protected String testDir = null; protected String testName = null; protected Level _oldLevel = null; - + protected boolean _enableTracing = true; + @Override public void setUp() { Class clazz = this.getClass(); @@ -78,10 +79,12 @@ public void setUp() { //run all mlcontext tests in loglevel trace to improve test coverage //of all logging in various components - _oldLevel = Logger.getLogger("org.apache.sysds").getLevel(); - Logger.getLogger("org.apache.sysds").setLevel( Level.TRACE ); + if( _enableTracing ) { + _oldLevel = Logger.getLogger("org.apache.sysds").getLevel(); + Logger.getLogger("org.apache.sysds").setLevel( Level.TRACE ); + } } - + @BeforeClass public static void setUpClass() { spark = createSystemDSSparkSession("SystemDS MLContext Test", "local"); @@ -93,7 +96,8 @@ public static void setUpClass() { @Override public void tearDown() { super.tearDown(); - Logger.getLogger("org.apache.sysds").setLevel( _oldLevel ); + if(_enableTracing) + Logger.getLogger("org.apache.sysds").setLevel( _oldLevel ); } @AfterClass