-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncate excessively large log output in large collections #265
Conversation
02697bb
to
6a37c9e
Compare
Pull Request Test Coverage Report for Build 3156846522
💛 - Coveralls |
While using |
6a37c9e
to
90a84f3
Compare
90a84f3
to
a3ec07a
Compare
a3ec07a
to
81387f0
Compare
PR is now ready to review since new scalatest has been released fixing the problem mentioned at #265 (comment) (see scalatest/scalatest#2155 (comment)). You can see a result of the truncation here when I deliberately make a test fail.
|
About this change - What it does
Overrides the default scalatest prettifier to one that truncates in the case of having excessively large collections
Why this way
Currently we have the issue where if one of the S3 tests fails then it creates an excessively large test output (example https://github.com/aiven/guardian-for-apache-kafka/runs/7500976439?check_suite_focus=true) due to the fact that we create very large collections (i.e. many megs in size). Overridding the prettifier with
Prettifier.truncateAt
allows to limit the size of the collection.Note that scalatest will still print the initial seed that caused a failure so its still possible to recreate the test scenario without having to see the generated dataset.