florin-akermann commented on PR #15189:
URL: https://github.com/apache/kafka/pull/15189#issuecomment-2041579829

   Hi @mjsax 
   It's now rebased.
   Plus, I addressed your reply below.
   
   > If find this test a little bit hard to follow...
   > 
   > We start to open a window `[5;15]` with the first input record. This 
window would close at `31` so why do we dump to `40`, and test dropping with 
`ts=24` -- both are totally unrelated to the left input record's window.
   > 
   > Also, it would be good to test that we can join out-of-order record 
successfully as long as the window is open, and that we don't drop re-mature 
before we hit the close time, thus I would suggest something like this:
   > 
   > ```
   > // prepare
   > - left input at 15 -> open window
   > // positive test
   > - bump time to 30 (different key) -> window still open
   > - right input at 5 -> joins (no need to test with 4, because 4 won't join 
because of window size anyway...)
   > - right input at 25 -> joins 
   > // negative test
   > - bump time to 31 (different key) -> window closes
   > - right input at 5 -> dropped (recorded with metric)
   > - right input at 25 -> does not join any longer; window closed (for this 
case we don't drop and don't record metric)
   > // test sharp lower drop bound
   >  - right input at 6 -> does not join any longer; window closed (for this 
case we don't drop though and don't record metric)
   > // cont. with additional sanity check:
   > - left input at 16 -> joins with both right input at 6 and right input at 
25 -- to verify both records did not get dropped
   > ```
   
   I would argue that the second 'right input at 25' still should join / emit a 
record because the other window is still active and 'ts=15' within its bounds. 
Other than that the expected behavior of the test cases in 
KStreamKStreamWindowCloseTest is in line with what you suggested.
   
   


-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to