[FLINK-8565][tests] Ensure locationBytes.length > 0 This closes #5417.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/2479ff53 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/2479ff53 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/2479ff53 Branch: refs/heads/master Commit: 2479ff53cf33e8150c987e8368f112e747233ce9 Parents: f8afc9f Author: zentol <[email protected]> Authored: Tue Feb 6 14:07:23 2018 +0100 Committer: zentol <[email protected]> Committed: Tue Feb 6 20:20:48 2018 +0100 ---------------------------------------------------------------------- .../org/apache/flink/runtime/checkpoint/CheckpointOptionsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/2479ff53/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointOptionsTest.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointOptionsTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointOptionsTest.java index 5a37631..925a9e4 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointOptionsTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointOptionsTest.java @@ -48,7 +48,7 @@ public class CheckpointOptionsTest { @Test public void testSavepoint() throws Exception { final Random rnd = new Random(); - final byte[] locationBytes = new byte[rnd.nextInt(42)]; + final byte[] locationBytes = new byte[rnd.nextInt(41) + 1]; rnd.nextBytes(locationBytes); final CheckpointOptions options = new CheckpointOptions(
