flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [tests] Decrease verbosity of ChaosMonkeyITCase
Date Tue, 01 Dec 2015 12:52:58 GMT
Repository: flink
Updated Branches:
  refs/heads/master 5a3d0728f -> 31f6a744c


[tests] Decrease verbosity of ChaosMonkeyITCase


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

Branch: refs/heads/master
Commit: 31f6a744c78adcb4f702da3cbabe7d462a66184e
Parents: 5a3d072
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Tue Dec 1 13:51:11 2015 +0100
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Tue Dec 1 13:52:30 2015 +0100

----------------------------------------------------------------------
 .../state/filesystem/AbstractFileState.java      |  2 +-
 .../flink/test/recovery/ChaosMonkeyITCase.java   | 19 ++++++-------------
 2 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/31f6a744/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileState.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileState.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileState.java
index e0a42b4..08cd7dd 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileState.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileState.java
@@ -64,7 +64,7 @@ public abstract class AbstractFileState implements java.io.Serializable
{
 	public void discardState() throws Exception {
 		getFileSystem().delete(filePath, false);
 
-		// send a call to delete the directory containing the file. this will
+		// send a call to delete the checkpoint directory containing the file. This will
 		// fail (and be ignored) when some files still exist
 		try {
 			getFileSystem().delete(filePath.getParent(), false);

http://git-wip-us.apache.org/repos/asf/flink/blob/31f6a744/flink-tests/src/test/java/org/apache/flink/test/recovery/ChaosMonkeyITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/recovery/ChaosMonkeyITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/recovery/ChaosMonkeyITCase.java
index 3ec8380..fc518af 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/recovery/ChaosMonkeyITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/recovery/ChaosMonkeyITCase.java
@@ -46,8 +46,8 @@ import org.apache.flink.streaming.api.checkpoint.Checkpointed;
 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
 import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
 import org.apache.flink.streaming.api.functions.source.RichParallelSourceFunction;
+import org.apache.flink.util.TestLogger;
 import org.junit.AfterClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,6 +58,7 @@ import scala.concurrent.duration.FiniteDuration;
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -69,7 +70,7 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-public class ChaosMonkeyITCase {
+public class ChaosMonkeyITCase extends TestLogger {
 
 	private static final Logger LOG = LoggerFactory.getLogger(ChaosMonkeyITCase.class);
 
@@ -333,7 +334,7 @@ public class ChaosMonkeyITCase {
 				jobManagerProcess.printProcessLog();
 			}
 
-			t.printStackTrace();
+			throw t;
 		}
 		finally {
 			for (JobManagerProcess jobManagerProcess : jobManagerProcesses) {
@@ -542,7 +543,7 @@ public class ChaosMonkeyITCase {
 
 		LOG.info("Checking file system backend state...");
 
-		File fsCheckpoints = new File(config.getString(FsStateBackendFactory.CHECKPOINT_DIRECTORY_URI_CONF_KEY,
""));
+		File fsCheckpoints = new File(new URI(config.getString(FsStateBackendFactory.CHECKPOINT_DIRECTORY_URI_CONF_KEY,
"")).getPath());
 
 		LOG.info("Checking " + fsCheckpoints);
 
@@ -550,12 +551,8 @@ public class ChaosMonkeyITCase {
 		if (files == null) {
 			fail(fsCheckpoints + " does not exist: " + Arrays.toString(FileStateBackendBasePath.listFiles()));
 		}
-		else {
-			assertEquals("Unclean file system checkpoints: " + Arrays.toString(fsCheckpoints.listFiles()),
-					0, files.length);
-		}
 
-		File fsRecovery = new File(config.getString(ConfigConstants.ZOOKEEPER_RECOVERY_PATH, ""));
+		File fsRecovery = new File(new URI(config.getString(ConfigConstants.ZOOKEEPER_RECOVERY_PATH,
"")).getPath());
 
 		LOG.info("Checking " + fsRecovery);
 
@@ -563,10 +560,6 @@ public class ChaosMonkeyITCase {
 		if (files == null) {
 			fail(fsRecovery + " does not exist: " + Arrays.toString(FileStateBackendBasePath.listFiles()));
 		}
-		else {
-			assertEquals("Unclean file system checkpoints: " + Arrays.toString(fsRecovery.listFiles()),
-					0, files.length);
-		}
 	}
 
 	private void waitForJobRemoved(


Mime
View raw message