You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/08/02 12:46:53 UTC

[2/7] flink git commit: [FLINK-7346] [tests] EventTimeWindowCheckpointingITCases print progress before each test

[FLINK-7346] [tests] EventTimeWindowCheckpointingITCases print progress before each test

Travis checks how long maven did not produce an output and we assume that a
test hangs if no output is produces within 300s.
IncrementalRocksDbBackendEventTimeWindowCheckpointingITCase executes several
tests but output is only generated at the end of the whole suite which may,
under certain circumstances, already take longer than 300s. Therefore, simply
provide some output in the form of progress messages regarding the execution
of test cases.

This closes #4419.


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

Branch: refs/heads/master
Commit: 223b7b7f0504871c2fe9b3c23de8db9f9ad7ba5f
Parents: 6ade949
Author: Nico Kruber <ni...@data-artisans.com>
Authored: Fri Jul 28 15:00:15 2017 +0200
Committer: zentol <ch...@apache.org>
Committed: Wed Aug 2 14:46:15 2017 +0200

----------------------------------------------------------------------
 ...tractEventTimeWindowCheckpointingITCase.java | 23 +++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/223b7b7f/flink-tests/src/test/java/org/apache/flink/test/checkpointing/AbstractEventTimeWindowCheckpointingITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/AbstractEventTimeWindowCheckpointingITCase.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/AbstractEventTimeWindowCheckpointingITCase.java
index 269b126..22ed847 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/AbstractEventTimeWindowCheckpointingITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/AbstractEventTimeWindowCheckpointingITCase.java
@@ -48,12 +48,14 @@ import org.apache.flink.test.util.SuccessException;
 import org.apache.flink.util.Collector;
 import org.apache.flink.util.TestLogger;
 
+import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -88,6 +90,9 @@ public abstract class AbstractEventTimeWindowCheckpointingITCase extends TestLog
 	@Rule
 	public TemporaryFolder tempFolder = new TemporaryFolder();
 
+	@Rule
+	public TestName name = new TestName();
+
 	private StateBackendEnum stateBackendEnum;
 	private AbstractStateBackend stateBackend;
 
@@ -123,7 +128,13 @@ public abstract class AbstractEventTimeWindowCheckpointingITCase extends TestLog
 	}
 
 	@Before
-	public void initStateBackend() throws IOException {
+	public void beforeTest() throws IOException {
+		// print a message when starting a test method to avoid Travis' <tt>"Maven produced no
+		// output for xxx seconds."</tt> messages
+		System.out.println(
+			"Starting " + getClass().getCanonicalName() + "#" + name.getMethodName() + ".");
+
+		// init state back-end
 		switch (stateBackendEnum) {
 			case MEM:
 				this.stateBackend = new MemoryStateBackend(MAX_MEM_STATE_SIZE, false);
@@ -166,6 +177,16 @@ public abstract class AbstractEventTimeWindowCheckpointingITCase extends TestLog
 		}
 	}
 
+	/**
+	 * Prints a message when finishing a test method to avoid Travis' <tt>"Maven produced no output
+	 * for xxx seconds."</tt> messages.
+	 */
+	@After
+	public void afterTest() {
+		System.out.println(
+			"Finished " + getClass().getCanonicalName() + "#" + name.getMethodName() + ".");
+	}
+
 	// ------------------------------------------------------------------------
 
 	@Test