Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/6170#discussion_r197716928
--- Diff:
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/CEPITCase.java ---
@@ -512,12 +491,16 @@ public String select(Map<String, List<Event>>
pattern) {
}
);
- result.writeAsText(resultPath, FileSystem.WriteMode.OVERWRITE);
+ List<Either<String, String>> resultList = new ArrayList<>();
+
+
DataStreamUtils.collect(result).forEachRemaining(resultList::add);
- // the expected sequences of matching event ids
- expected =
"Left(1.0)\nLeft(2.0)\nLeft(2.0)\nRight(2.0,2.0,2.0)";
+ resultList.sort(Comparator.comparing(either ->
either.toString()));
- env.execute();
+ List<Either<String, String>> expected =
Arrays.asList(Either.Left.of("1.0"), Either.Left.of("2.0"),
+
Either.Left.of("2.0"), Either.Right.of("2.0,2.0,2.0"));
--- End diff --
indentation should only be 1 tab
---