shuai-xu commented on a change in pull request #11235: [FLINK-15980] fix that 
the notFollowedBy in the end of GroupPattern may be ignored
URL: https://github.com/apache/flink/pull/11235#discussion_r386905832
 
 

 ##########
 File path: 
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NotPatternITCase.java
 ##########
 @@ -980,6 +980,53 @@ public void 
testNotFollowedByBeforeZeroOrMoreCombinationsSkipTillAny() throws Ex
                ));
        }
 
+       @Test
+       public void testNotFollowedByInTheEndOfGroupPattern() throws Exception {
+
+               List<StreamRecord<Event>> inputEvents = new ArrayList<>();
+
+               int i = 0;
+               inputEvents.add(new StreamRecord<>(NotFollowByData.A_1, i++));
+               inputEvents.add(new StreamRecord<>(NotFollowByData.C_1, i++));
+               inputEvents.add(new StreamRecord<>(NotFollowByData.B_1, i++));
+               inputEvents.add(new StreamRecord<>(NotFollowByData.A_1, i++));
+               inputEvents.add(new StreamRecord<>(NotFollowByData.B_2, i++));
+
+               Pattern<Event, ?> startPattern = Pattern
+                               .<Event>begin("a").where(new 
SimpleCondition<Event>() {
+                                       private static final long 
serialVersionUID = 5726188262756267490L;
+
+                                       @Override
+                                       public boolean filter(Event value) 
throws Exception {
+                                               return 
value.getName().equals("a");
+                                       }
+                               })
+                               .notFollowedBy("not c").where(new 
SimpleCondition<Event>() {
+                                       private static final long 
serialVersionUID = 5726188262756267490L;
 
 Review comment:
   OK

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to