Add test case for JUnit Jupiter @Nested class - #773#833
Open
mskacelik wants to merge 1 commit intoarquillian:mainfrom
Open
Add test case for JUnit Jupiter @Nested class - #773#833mskacelik wants to merge 1 commit intoarquillian:mainfrom
mskacelik wants to merge 1 commit intoarquillian:mainfrom
Conversation
Reviewer's GuideAdds a new JUnit 5 @nested class Arquillian lifecycle test and generalizes FileWriterExtension so expected lifecycle traces are provided via a new @ExpectedTrace annotation, allowing reuse across multiple tests including nested-class scenarios. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In FileWriterExtension.readFromFile(), relying on a fixed 10,000-char buffer and stripping the last character assumes a trailing separator and bounded file size; consider using Files.readString(getTmpFilePath()) and trimming as needed to make the read logic simpler and more robust.
- FileWriterExtension keeps TMP_FILE_PATH as a static mutable field while also keying the extension instance by test class; this can lead to interference between tests (especially if run in parallel), so it would be safer to make the path instance- or class-specific rather than shared static state.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In FileWriterExtension.readFromFile(), relying on a fixed 10,000-char buffer and stripping the last character assumes a trailing separator and bounded file size; consider using Files.readString(getTmpFilePath()) and trimming as needed to make the read logic simpler and more robust.
- FileWriterExtension keeps TMP_FILE_PATH as a static mutable field while also keying the extension instance by test class; this can lead to interference between tests (especially if run in parallel), so it would be safer to make the path instance- or class-specific rather than shared static state.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
|
Approving workflows to run now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduced a new test class for the
@Nestedtest. Tried to reuse theFileWriterExtensionpattern (for the persistent state between client and server/container) but had to make some changes since theFileWriterExtensionwasn't very flexible for other test cases.Summary by Sourcery
Add support in the lifecycle test infrastructure to assert configurable expected traces and introduce coverage for JUnit Jupiter nested test classes.
Enhancements:
Tests: