flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [FLINK-2521] [tests] Adds TestLogger class which automatically logs the currently executed test names and the reasons for a failure.
Date Tue, 18 Aug 2015 11:35:26 GMT
Repository: flink
Updated Branches:
  refs/heads/master 3fcc04ab3 -> 2f0412f16


[FLINK-2521] [tests] Adds TestLogger class which automatically logs the currently executed
test names and the reasons for a failure.

Makes test bases extend TestLogger to add automatic test name logging

Frames test logging statements to make them more prominent

This closes #1015.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/2f0412f1
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/2f0412f1
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/2f0412f1

Branch: refs/heads/master
Commit: 2f0412f163f4d37605188c8cc763111e0b51f0dc
Parents: 3fcc04a
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Fri Aug 14 15:06:06 2015 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Tue Aug 18 13:35:02 2015 +0200

----------------------------------------------------------------------
 .../api/common/io/SequentialFormatTestBase.java |  3 +-
 .../common/typeutils/ComparatorTestBase.java    |  3 +-
 .../common/typeutils/SerializerTestBase.java    |  3 +-
 .../flink/configuration/ConfigurationTest.java  |  4 +-
 .../configuration/GlobalConfigurationTest.java  |  3 +-
 .../UnmodifiableConfigurationTest.java          |  3 +-
 .../flink/types/parser/ParserTestBase.java      |  3 +-
 .../org/apache/flink/util/AbstractIDTest.java   |  2 +-
 .../flink/util/InstantiationUtilTest.java       |  2 +-
 .../flink/util/NumberSequenceIteratorTest.java  |  2 +-
 .../flink/util/SimpleStringUtilsTest.java       |  2 +-
 .../org/apache/flink/util/StringUtilsTest.java  |  2 +-
 .../java/org/apache/flink/util/TestLogger.java  | 59 ++++++++++++++++++++
 .../tuple/base/TuplePairComparatorTestBase.java |  3 +-
 flink-optimizer/pom.xml                         |  8 +++
 .../flink/optimizer/util/CompilerTestBase.java  |  3 +-
 flink-runtime/pom.xml                           |  8 +++
 .../network/partition/SubpartitionTestBase.java |  3 +-
 .../operators/testutils/DriverTestBase.java     |  3 +-
 .../operators/testutils/TaskTestBase.java       |  3 +-
 .../testutils/UnaryOperatorTestBase.java        |  3 +-
 flink-test-utils/pom.xml                        |  6 ++
 .../apache/flink/test/util/TestBaseUtils.java   |  3 +-
 .../test/cancelling/CancellingTestBase.java     |  3 +-
 .../StreamFaultToleranceTestBase.java           |  3 +-
 .../ScalaAPICompletenessTestBase.scala          |  3 +-
 .../tuple/base/PairComparatorTestBase.scala     |  3 +-
 .../org/apache/flink/yarn/YarnTestBase.java     |  3 +-
 28 files changed, 124 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/api/common/io/SequentialFormatTestBase.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/api/common/io/SequentialFormatTestBase.java
b/flink-core/src/test/java/org/apache/flink/api/common/io/SequentialFormatTestBase.java
index 3e4697a..91f80e8 100644
--- a/flink-core/src/test/java/org/apache/flink/api/common/io/SequentialFormatTestBase.java
+++ b/flink-core/src/test/java/org/apache/flink/api/common/io/SequentialFormatTestBase.java
@@ -33,6 +33,7 @@ import org.apache.flink.core.fs.FileInputSplit;
 import org.apache.flink.core.fs.Path;
 import org.apache.flink.core.memory.DataOutputView;
 import org.apache.flink.core.memory.OutputViewDataOutputStreamWrapper;
+import org.apache.flink.util.TestLogger;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -42,7 +43,7 @@ import org.junit.runners.Parameterized.Parameters;
 /**
  * Test base for {@link org.apache.flink.api.common.io.BinaryInputFormat} and {@link org.apache.flink.api.common.io.BinaryOutputFormat}.
  */
-public abstract class SequentialFormatTestBase<T> {
+public abstract class SequentialFormatTestBase<T> extends TestLogger {
 
 	public class InputSplitSorter implements Comparator<FileInputSplit> {
 		@Override

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/api/common/typeutils/ComparatorTestBase.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/ComparatorTestBase.java
b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/ComparatorTestBase.java
index bc5c6b6..782c402 100644
--- a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/ComparatorTestBase.java
+++ b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/ComparatorTestBase.java
@@ -29,6 +29,7 @@ import static org.junit.Assert.*;
 import org.apache.flink.core.memory.DataInputView;
 import org.apache.flink.core.memory.DataOutputView;
 import org.apache.flink.core.memory.MemorySegment;
+import org.apache.flink.util.TestLogger;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -37,7 +38,7 @@ import org.junit.Test;
  *
  * @param <T>
  */
-public abstract class ComparatorTestBase<T> {
+public abstract class ComparatorTestBase<T> extends TestLogger {
 
 	// Same as in the NormalizedKeySorter
 	private static final int DEFAULT_MAX_NORMALIZED_KEY_LEN = 8;

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/api/common/typeutils/SerializerTestBase.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/SerializerTestBase.java
b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/SerializerTestBase.java
index 998ae12..ea91e56 100644
--- a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/SerializerTestBase.java
+++ b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/SerializerTestBase.java
@@ -31,6 +31,7 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 import java.util.Arrays;
 
+import org.apache.flink.util.TestLogger;
 import org.junit.Assert;
 
 import org.apache.commons.lang3.SerializationException;
@@ -47,7 +48,7 @@ import org.junit.Test;
  * (JodaTime DataTime) with the default KryoSerializer used to pass this test but the
  * internal state would be corrupt, which becomes evident when toString is called.
  */
-public abstract class SerializerTestBase<T> {
+public abstract class SerializerTestBase<T> extends TestLogger {
 	
 	protected abstract TypeSerializer<T> createSerializer();
 	

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/configuration/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/configuration/ConfigurationTest.java
b/flink-core/src/test/java/org/apache/flink/configuration/ConfigurationTest.java
index 33dde3d..e3b75b6 100644
--- a/flink-core/src/test/java/org/apache/flink/configuration/ConfigurationTest.java
+++ b/flink-core/src/test/java/org/apache/flink/configuration/ConfigurationTest.java
@@ -25,18 +25,18 @@ import static org.junit.Assert.fail;
 
 import org.apache.flink.core.testutils.CommonTestUtils;
 
+import org.apache.flink.util.TestLogger;
 import org.junit.Test;
 
 /**
  * This class contains test for the configuration package. In particular, the serialization
of {@link Configuration}
  * objects is tested.
  */
-public class ConfigurationTest {
+public class ConfigurationTest extends TestLogger {
 	
 	private static final byte[] EMPTY_BYTES = new byte[0];
 	private static final long TOO_LONG = Integer.MAX_VALUE + 10L;
 	private static final double TOO_LONG_DOUBLE = Double.MAX_VALUE;
-	
 
 	/**
 	 * This test checks the serialization/deserialization of configuration objects.

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/configuration/GlobalConfigurationTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/configuration/GlobalConfigurationTest.java
b/flink-core/src/test/java/org/apache/flink/configuration/GlobalConfigurationTest.java
index f207f78..41e97b2 100644
--- a/flink-core/src/test/java/org/apache/flink/configuration/GlobalConfigurationTest.java
+++ b/flink-core/src/test/java/org/apache/flink/configuration/GlobalConfigurationTest.java
@@ -27,13 +27,14 @@ import java.io.PrintWriter;
 import java.lang.reflect.Field;
 
 import org.apache.flink.core.testutils.CommonTestUtils;
+import org.apache.flink.util.TestLogger;
 import org.junit.Before;
 import org.junit.Test;
 
 /**
  * This class contains tests for the global configuration (parsing configuration directory
information).
  */
-public class GlobalConfigurationTest {
+public class GlobalConfigurationTest extends TestLogger {
 
 	@Before
 	public void resetSingleton() throws SecurityException, NoSuchFieldException, IllegalArgumentException,

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/configuration/UnmodifiableConfigurationTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/configuration/UnmodifiableConfigurationTest.java
b/flink-core/src/test/java/org/apache/flink/configuration/UnmodifiableConfigurationTest.java
index 3ea52b8..386d03b 100644
--- a/flink-core/src/test/java/org/apache/flink/configuration/UnmodifiableConfigurationTest.java
+++ b/flink-core/src/test/java/org/apache/flink/configuration/UnmodifiableConfigurationTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import org.apache.flink.util.TestLogger;
 import org.junit.Test;
 
 import java.lang.reflect.InvocationTargetException;
@@ -34,7 +35,7 @@ import java.util.Map;
  * This class verifies that the Unmodifiable Configuration class overrides all setter methods
in
  * Configuration.
  */
-public class UnmodifiableConfigurationTest {
+public class UnmodifiableConfigurationTest extends TestLogger {
 	
 	@Test
 	public void testOverrideAddMethods() {

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/types/parser/ParserTestBase.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/types/parser/ParserTestBase.java b/flink-core/src/test/java/org/apache/flink/types/parser/ParserTestBase.java
index 94fe327..b979a38 100644
--- a/flink-core/src/test/java/org/apache/flink/types/parser/ParserTestBase.java
+++ b/flink-core/src/test/java/org/apache/flink/types/parser/ParserTestBase.java
@@ -26,13 +26,14 @@ import static org.junit.Assert.fail;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
+import org.apache.flink.util.TestLogger;
 import org.junit.Test;
 
 
 /**
  *
  */
-public abstract class ParserTestBase<T> {
+public abstract class ParserTestBase<T> extends TestLogger {
 	
 	public abstract String[] getValidTestValues();
 	

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java b/flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java
index 8c7e8b5..8de3b94 100644
--- a/flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java
+++ b/flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java
@@ -30,7 +30,7 @@ import java.nio.ByteBuffer;
 /**
  * This class contains tests for the {@link org.apache.flink.util.AbstractID} class.
  */
-public class AbstractIDTest {
+public class AbstractIDTest extends TestLogger {
 	/**
 	 * Tests the serialization/deserialization of an abstract ID.
 	 */

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/util/InstantiationUtilTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/util/InstantiationUtilTest.java b/flink-core/src/test/java/org/apache/flink/util/InstantiationUtilTest.java
index aded919..f9500b0 100644
--- a/flink-core/src/test/java/org/apache/flink/util/InstantiationUtilTest.java
+++ b/flink-core/src/test/java/org/apache/flink/util/InstantiationUtilTest.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-public class InstantiationUtilTest {
+public class InstantiationUtilTest extends TestLogger {
 
 	@Test
 	public void testInstantiationOfStringValue() {

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/util/NumberSequenceIteratorTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/util/NumberSequenceIteratorTest.java
b/flink-core/src/test/java/org/apache/flink/util/NumberSequenceIteratorTest.java
index 6698167..edaeb7a 100644
--- a/flink-core/src/test/java/org/apache/flink/util/NumberSequenceIteratorTest.java
+++ b/flink-core/src/test/java/org/apache/flink/util/NumberSequenceIteratorTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertTrue;
 import org.junit.Test;
 
 
-public class NumberSequenceIteratorTest {
+public class NumberSequenceIteratorTest extends TestLogger {
 
 	@Test
 	public void testSplitRegular() {

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/util/SimpleStringUtilsTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/util/SimpleStringUtilsTest.java b/flink-core/src/test/java/org/apache/flink/util/SimpleStringUtilsTest.java
index 9794fa3..98f8574 100644
--- a/flink-core/src/test/java/org/apache/flink/util/SimpleStringUtilsTest.java
+++ b/flink-core/src/test/java/org/apache/flink/util/SimpleStringUtilsTest.java
@@ -28,7 +28,7 @@ import org.apache.flink.util.SimpleStringUtils.WhitespaceTokenizer;
 import org.junit.Test;
 
 
-public class SimpleStringUtilsTest {
+public class SimpleStringUtilsTest extends TestLogger {
 
 	@Test
 	public void testToLowerCaseConverting() {

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/util/StringUtilsTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/util/StringUtilsTest.java b/flink-core/src/test/java/org/apache/flink/util/StringUtilsTest.java
index b580fc6..3f6b16d 100644
--- a/flink-core/src/test/java/org/apache/flink/util/StringUtilsTest.java
+++ b/flink-core/src/test/java/org/apache/flink/util/StringUtilsTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertEquals;
 import org.apache.flink.util.StringUtils;
 import org.junit.Test;
 
-public class StringUtilsTest {
+public class StringUtilsTest extends TestLogger {
 
 	@Test
 	public void testControlCharacters() {

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-core/src/test/java/org/apache/flink/util/TestLogger.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/util/TestLogger.java b/flink-core/src/test/java/org/apache/flink/util/TestLogger.java
new file mode 100644
index 0000000..49d0f0f
--- /dev/null
+++ b/flink-core/src/test/java/org/apache/flink/util/TestLogger.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.util;
+
+import org.junit.Rule;
+import org.junit.rules.TestRule;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Adds automatic test name logging. Every test which wants to log which test is currently
+ * executed and why it failed, simply has to extend this class.
+ */
+public class TestLogger {
+	protected final Logger log = LoggerFactory.getLogger(getClass());
+
+	@Rule
+	public TestRule watchman = new TestWatcher() {
+
+		@Override
+		public void starting(Description description) {
+			log.info("================================================================================");
+			log.info("Test {} is running.", description);
+			log.info("--------------------------------------------------------------------------------");
+		}
+
+		@Override
+		public void succeeded(Description description) {
+			log.info("--------------------------------------------------------------------------------");
+			log.info("Test {} successfully run.", description);
+			log.info("================================================================================");
+		}
+
+		@Override
+		public void failed(Throwable e, Description description) {
+			log.error("--------------------------------------------------------------------------------");
+			log.error("Test {} failed with:\n{}", description, StringUtils.stringifyException(e));
+			log.error("================================================================================");
+		}
+	};
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/tuple/base/TuplePairComparatorTestBase.java
----------------------------------------------------------------------
diff --git a/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/tuple/base/TuplePairComparatorTestBase.java
b/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/tuple/base/TuplePairComparatorTestBase.java
index 17f85c9..1d414d8 100644
--- a/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/tuple/base/TuplePairComparatorTestBase.java
+++ b/flink-java/src/test/java/org/apache/flink/api/java/typeutils/runtime/tuple/base/TuplePairComparatorTestBase.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.fail;
 import org.apache.flink.api.common.typeutils.TypePairComparator;
 import org.apache.flink.api.java.tuple.Tuple;
 import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.util.TestLogger;
 import org.junit.Test;
 
 /**
@@ -32,7 +33,7 @@ import org.junit.Test;
  * @param <T>
  * @param <R>
  */
-public abstract class TuplePairComparatorTestBase<T extends Tuple, R extends Tuple>
{
+public abstract class TuplePairComparatorTestBase<T extends Tuple, R extends Tuple>
extends TestLogger {
 
 	protected abstract TypePairComparator<T, R> createComparator(boolean ascending);
 

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-optimizer/pom.xml
----------------------------------------------------------------------
diff --git a/flink-optimizer/pom.xml b/flink-optimizer/pom.xml
index 868ca3a..512c415 100644
--- a/flink-optimizer/pom.xml
+++ b/flink-optimizer/pom.xml
@@ -43,6 +43,14 @@ under the License.
 
 		<dependency>
 			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-core</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-runtime</artifactId>
 			<version>${project.version}</version>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-optimizer/src/test/java/org/apache/flink/optimizer/util/CompilerTestBase.java
----------------------------------------------------------------------
diff --git a/flink-optimizer/src/test/java/org/apache/flink/optimizer/util/CompilerTestBase.java
b/flink-optimizer/src/test/java/org/apache/flink/optimizer/util/CompilerTestBase.java
index 35c50d3..b4c39a5 100644
--- a/flink-optimizer/src/test/java/org/apache/flink/optimizer/util/CompilerTestBase.java
+++ b/flink-optimizer/src/test/java/org/apache/flink/optimizer/util/CompilerTestBase.java
@@ -38,6 +38,7 @@ import org.apache.flink.optimizer.plan.OptimizedPlan;
 import org.apache.flink.optimizer.plan.PlanNode;
 import org.apache.flink.optimizer.plan.SingleInputPlanNode;
 import org.apache.flink.util.OperatingSystem;
+import org.apache.flink.util.TestLogger;
 import org.apache.flink.util.Visitor;
 import org.junit.Before;
 
@@ -46,7 +47,7 @@ import org.junit.Before;
  * of a program and to fetch the nodes in an optimizer plan that correspond
  * the the node in the program plan.
  */
-public abstract class CompilerTestBase implements java.io.Serializable {
+public abstract class CompilerTestBase extends TestLogger implements java.io.Serializable
{
 
 	private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-runtime/pom.xml
----------------------------------------------------------------------
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index 065467f..6dc8d42 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -47,6 +47,14 @@ under the License.
 
 		<dependency>
 			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-core</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-java</artifactId>
 			<version>${project.version}</version>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SubpartitionTestBase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SubpartitionTestBase.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SubpartitionTestBase.java
index a41a013..cb0069b 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SubpartitionTestBase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SubpartitionTestBase.java
@@ -19,6 +19,7 @@
 package org.apache.flink.runtime.io.network.partition;
 
 import org.apache.flink.runtime.io.network.buffer.Buffer;
+import org.apache.flink.util.TestLogger;
 import org.junit.Test;
 
 import static org.junit.Assert.assertFalse;
@@ -27,7 +28,7 @@ import static org.mockito.Mockito.mock;
 /**
  * Basic subpartition behaviour tests.
  */
-public abstract class SubpartitionTestBase {
+public abstract class SubpartitionTestBase extends TestLogger {
 
 	/**
 	 * Return the subpartition to be tested.

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/DriverTestBase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/DriverTestBase.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/DriverTestBase.java
index 642ac7d..e4aad98 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/DriverTestBase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/DriverTestBase.java
@@ -27,6 +27,7 @@ import java.util.List;
 
 import org.apache.flink.api.common.ExecutionConfig;
 import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
+import org.apache.flink.util.TestLogger;
 import org.junit.Assert;
 import org.apache.flink.api.common.functions.Function;
 import org.apache.flink.api.common.functions.util.FunctionUtils;
@@ -53,7 +54,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 @RunWith(Parameterized.class)
-public class DriverTestBase<S extends Function> implements PactTaskContext<S, Record>
{
+public class DriverTestBase<S extends Function> extends TestLogger implements PactTaskContext<S,
Record> {
 	
 	protected static final long DEFAULT_PER_SORT_MEM = 16 * 1024 * 1024;
 	

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TaskTestBase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TaskTestBase.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TaskTestBase.java
index c7be7a5..c04d051 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TaskTestBase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TaskTestBase.java
@@ -36,12 +36,13 @@ import org.apache.flink.runtime.operators.util.TaskConfig;
 import org.apache.flink.types.Record;
 import org.apache.flink.util.InstantiationUtil;
 import org.apache.flink.util.MutableObjectIterator;
+import org.apache.flink.util.TestLogger;
 import org.junit.After;
 import org.junit.Assert;
 
 import java.util.List;
 
-public abstract class TaskTestBase {
+public abstract class TaskTestBase extends TestLogger {
 	
 	protected long memorySize = 0;
 

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/UnaryOperatorTestBase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/UnaryOperatorTestBase.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/UnaryOperatorTestBase.java
index 20edc20..9600e5a 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/UnaryOperatorTestBase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/UnaryOperatorTestBase.java
@@ -40,6 +40,7 @@ import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
 import org.apache.flink.util.Collector;
 import org.apache.flink.util.MutableObjectIterator;
 
+import org.apache.flink.util.TestLogger;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.runner.RunWith;
@@ -51,7 +52,7 @@ import java.util.Collection;
 import java.util.List;
 
 @RunWith(Parameterized.class)
-public class UnaryOperatorTestBase<S extends Function, IN, OUT> implements PactTaskContext<S,
OUT> {
+public class UnaryOperatorTestBase<S extends Function, IN, OUT> extends TestLogger
implements PactTaskContext<S, OUT> {
 	
 	protected static final long DEFAULT_PER_SORT_MEM = 16 * 1024 * 1024;
 	

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-test-utils/pom.xml
----------------------------------------------------------------------
diff --git a/flink-test-utils/pom.xml b/flink-test-utils/pom.xml
index 4bb51ef..1eb5ff2 100644
--- a/flink-test-utils/pom.xml
+++ b/flink-test-utils/pom.xml
@@ -52,6 +52,12 @@ under the License.
 		</dependency>
 		<dependency>
 			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-core</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-runtime</artifactId>
 			<version>${project.version}</version>
 			<type>test-jar</type>

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java
----------------------------------------------------------------------
diff --git a/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java
b/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java
index cd6d3b2..9068fcc 100644
--- a/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java
+++ b/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java
@@ -32,6 +32,7 @@ import org.apache.flink.configuration.Configuration;
 import org.apache.flink.runtime.StreamingMode;
 import org.apache.flink.runtime.testingUtils.TestingTaskManagerMessages;
 import org.apache.flink.runtime.testingUtils.TestingUtils;
+import org.apache.flink.util.TestLogger;
 import org.apache.hadoop.fs.FileSystem;
 import org.junit.Assert;
 import org.slf4j.Logger;
@@ -66,7 +67,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-public class TestBaseUtils {
+public class TestBaseUtils extends TestLogger {
 
 	private static final Logger LOG = LoggerFactory.getLogger(TestBaseUtils.class);
 

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
b/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
index 1502110..088ea4d 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/cancelling/CancellingTestBase.java
@@ -26,6 +26,7 @@ import org.apache.flink.configuration.Configuration;
 import org.apache.flink.runtime.client.JobCancellationException;
 import org.apache.flink.runtime.messages.JobManagerMessages;
 import org.apache.flink.test.util.ForkableFlinkMiniCluster;
+import org.apache.flink.util.TestLogger;
 import org.junit.Assert;
 
 import org.slf4j.Logger;
@@ -45,7 +46,7 @@ import org.junit.Before;
 /**
  * 
  */
-public abstract class CancellingTestBase {
+public abstract class CancellingTestBase extends TestLogger {
 	
 	private static final Logger LOG = LoggerFactory.getLogger(CancellingTestBase.class);
 

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-tests/src/test/java/org/apache/flink/test/checkpointing/StreamFaultToleranceTestBase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/StreamFaultToleranceTestBase.java
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/StreamFaultToleranceTestBase.java
index 8920cf2..59f24b0 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/StreamFaultToleranceTestBase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/StreamFaultToleranceTestBase.java
@@ -23,6 +23,7 @@ import org.apache.flink.configuration.Configuration;
 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
 import org.apache.flink.test.util.ForkableFlinkMiniCluster;
 
+import org.apache.flink.util.TestLogger;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -34,7 +35,7 @@ import static org.junit.Assert.fail;
 /**
  * Test base for fault tolerant streaming programs
  */
-public abstract class StreamFaultToleranceTestBase {
+public abstract class StreamFaultToleranceTestBase extends TestLogger {
 
 	protected static final int NUM_TASK_MANAGERS = 2;
 	protected static final int NUM_TASK_SLOTS = 3;

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-tests/src/test/scala/org/apache/flink/api/scala/completeness/ScalaAPICompletenessTestBase.scala
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/scala/org/apache/flink/api/scala/completeness/ScalaAPICompletenessTestBase.scala
b/flink-tests/src/test/scala/org/apache/flink/api/scala/completeness/ScalaAPICompletenessTestBase.scala
index 0df4589..d1055d0 100644
--- a/flink-tests/src/test/scala/org/apache/flink/api/scala/completeness/ScalaAPICompletenessTestBase.scala
+++ b/flink-tests/src/test/scala/org/apache/flink/api/scala/completeness/ScalaAPICompletenessTestBase.scala
@@ -19,6 +19,7 @@ package org.apache.flink.api.scala.completeness
 
 import java.lang.reflect.Method
 
+import org.apache.flink.util.TestLogger
 import org.junit.Assert._
 import org.junit.Test
 
@@ -32,7 +33,7 @@ import scala.language.existentials
  *
  * Note: This is inspired by the JavaAPICompletenessChecker from Spark.
  */
-abstract class ScalaAPICompletenessTestBase {
+abstract class ScalaAPICompletenessTestBase extends TestLogger {
 
   /**
    * Determines whether a method is excluded by name.

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/tuple/base/PairComparatorTestBase.scala
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/tuple/base/PairComparatorTestBase.scala
b/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/tuple/base/PairComparatorTestBase.scala
index d3d52b0..5d154f5 100644
--- a/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/tuple/base/PairComparatorTestBase.scala
+++ b/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/tuple/base/PairComparatorTestBase.scala
@@ -17,6 +17,7 @@
  */
 package org.apache.flink.api.scala.runtime.tuple.base
 
+import org.apache.flink.util.TestLogger
 import org.junit.Assert.assertTrue
 import org.junit.Assert.fail
 import org.apache.flink.api.common.typeutils.TypePairComparator
@@ -25,7 +26,7 @@ import org.junit.Test
 /**
  * Abstract test base for PairComparators.
  */
-abstract class PairComparatorTestBase[T, R] {
+abstract class PairComparatorTestBase[T, R] extends TestLogger {
   protected def createComparator(ascending: Boolean): TypePairComparator[T, R]
 
   protected def getSortedTestData: (Array[T], Array[R])

http://git-wip-us.apache.org/repos/asf/flink/blob/2f0412f1/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
----------------------------------------------------------------------
diff --git a/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java b/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
index 2d22700..4399f19 100644
--- a/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
+++ b/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
@@ -22,6 +22,7 @@ import org.apache.commons.io.FileUtils;
 import org.apache.flink.client.CliFrontend;
 import org.apache.flink.client.FlinkYarnSessionCli;
 import org.apache.flink.test.util.TestBaseUtils;
+import org.apache.flink.util.TestLogger;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.service.Service;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
@@ -69,7 +70,7 @@ import java.util.concurrent.ConcurrentMap;
  *
  * The test is not thread-safe. Parallel execution of tests is not possible!
  */
-public abstract class YarnTestBase {
+public abstract class YarnTestBase extends TestLogger {
 	private static final Logger LOG = LoggerFactory.getLogger(YarnTestBase.class);
 
 	protected final static PrintStream originalStdout = System.out;


Mime
View raw message