Event file comparision has new result: Additional event #2866
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current
MISSING_EVENT
result was used in both direction of comparison.For me it was not intuitive, to always look in what direction the comparision fails (which is the file with the missing event).
Therefore, I propose, a new result depending on the comparison direction running
compare(file1, file2)
:MISSING_EVENT
.ADDITIONAL_EVENT
.This follows the logic from many test infrastructures, that file1 is the "expected" result, while file2 is the "actual" data.
As a follow-up, I would like to suggest and discuss the following (see #2867 ):
At least for me, it would be useful to have the option that the comparison will not stop, once both files are different. Instead, the comparison should be continued until the end and at least print out some numbers, like:
If one could also (optionally) print this events out, that may also help further for debugging. At least if we have integration tests, comparing event-files.
IMO: This can be done by introduce an enum for the comparison setting and behave based on it, e.g. either
abort
,countDifferences
,writeOutDifferences
.