Added two new methods to the ValidationResultFormatter:
one to format and print the suffix
and another to return the expected size of this suffix
Created empty default implementation for both methods not to break backwards-compatibility
Updated the write implementation to use the new formatter methods
Implemented the new methods in the TestResultFormatter and updated the test
Extend ValidationResults to allow write results until a max size
Added a new ValidationResults.write method that accepts a maxSize
keeps writing results to the writer as usual while comparing the size of the writer to the maxSize after every append
keeps track of the length of the writer after every append
if the size of the writer exceeds the max size, it resets the writer to the previous length and appends a suffix with the number of remaining results.
Added a new constructor to aggregate a list of ValidationResults into one
Zeebe uses two different validators, one for design-time validations, and one for run-time validations
Currently, it calls write on the two validation results separately. But since we need to limit the size of the printed results, it would be easier to have a way to combine both results in one, and call write only once for both.
Description
Update
write
implementation to use the new formatter methodsExtend ValidationResults to allow write results until a max size
Added a new
ValidationResults.write
method that accepts amaxSize
Added a new constructor to aggregate a list of ValidationResults into one
Zeebe uses two different validators, one for design-time validations, and one for run-time validations
Currently, it calls
write
on the two validation results separately. But since we need to limit the size of the printed results, it would be easier to have a way to combine both results in one, and callwrite
only once for both.Related issues
closes: #4443 related to: https://github.com/camunda/camunda/issues/11284