-
Notifications
You must be signed in to change notification settings - Fork 123
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
updating RegressionTest generateAnswers for when two classes are used for test .dat & answer files #821
updating RegressionTest generateAnswers for when two classes are used for test .dat & answer files #821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fundamentally broken - in fact, we'll also need to rework the related changes in the UnitTest
class because these changes aren't thread-safe, and could corrupt results when concurrently testing multiple classes that extend UnitTest or ExtractionTest. We can't use a static member in the base class to "store" the answer file paths.
h/t to @jdcove2 for noticing and pointing this out.
src/test/java/emissary/test/core/junit5/RegressionTestUtil.java
Outdated
Show resolved
Hide resolved
…ided in getMyTestParameterFiles
5580001
to
abaa765
Compare
updated based on the new thread-safe version of UnitTest (#826) that allows for different directories used for test data/answer files |
src/test/java/emissary/test/core/junit5/RegressionTestUtil.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still susceptible to race conditions across tests that extend RegressionTest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as intended when locally testing integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested these changes against a follow-on system and it worked as expected.
This updates
generateAnswers
to be able to generate answer files in the correct location whengetMyTestParameterFiles
is passed two separate classes. This allows files to generate/regenerate in the provided answer class, based on .dat files in the other class directory.