dawidwys commented on a change in pull request #6205: [FLINK-9642]Reduce the 
count to deal with state during a CEP process
URL: https://github.com/apache/flink/pull/6205#discussion_r211174586
 
 

 ##########
 File path: 
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFAITCase.java
 ##########
 @@ -2837,13 +2838,14 @@ public void testSharedBufferClearing() throws 
Exception {
                Event b = new Event(41, "b", 2.0);
 
                SharedBuffer<Event> spiedBuffer = Mockito.spy(sharedBuffer);
-               NFA<Event> nfa = compile(pattern, false);
-
-               nfa.process(spiedBuffer, nfa.createInitialNFAState(), a, 1);
-               nfa.process(spiedBuffer, nfa.createInitialNFAState(), b, 2);
-               Mockito.verify(spiedBuffer, 
Mockito.never()).advanceTime(anyLong());
-               nfa.advanceTime(spiedBuffer, nfa.createInitialNFAState(), 2);
-               Mockito.verify(spiedBuffer, Mockito.times(1)).advanceTime(2);
-
+               try (SharedBufferAccessor<Event> accessor = 
Mockito.spy(spiedBuffer.getAccessor())) {
 
 Review comment:
   This block of code is quite strange. I think we could spy only on one object 
when Nfa will work always on the accessor.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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