They are similar, but targeting different behaviors:
* `finalResultsSuppressionShouldBufferAndEmitLater` is the "main" unit test: 
verifying that the buffer saves up all the data and emits at the grace period 
expiration.
* `finalResultsWith0GraceBeforeWindowEndShouldBufferAndEmitLater` is somewhat 
of a "regression" test. I added it during implementation because I initially 
failed to account for this behavior: even when the grace period is 0, the final 
results buffer should wait until the end of the window before emitting (instead 
of immediately emitting). I think I can name the method better and add a 
comment to make this clear.

As far as randomized testing goes, I'd like to experiment with a fuzzing 
framework in the future, rather than hacking out a half-baked one right now. 
There are some important features, such as a mechanism to reproduce failing 
tests, that are necessary to make it a "randomized test", rather than a "flaky 
test".

For now, I'd rather just stick with hand-written scenarios.

[ Full content available at: https://github.com/apache/kafka/pull/5687 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to