test(config): stop SuiteRunnerIssueTestSample from re-entering itself - #3400
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe test setup adds a separate nested sample class, registers it in the generated XML suite, and labels the related configuration test with ChangesSuiteRunner test fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change prevents the suite-runner sample from recursively invoking itself and restores termination for the affected configuration test path; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| } | ||
|
|
||
| @Test | ||
| @Test(description = "GITHUB-3360") |
There was a problem hiding this comment.
| @Test(description = "GITHUB-3360") | |
| @Test(description = "GITHUB-2743") |
There was a problem hiding this comment.
yep, switched to GITHUB-2743
The nested XmlSuite listed the sample class as its only XmlClass, so running it rebuilt the same suite unbounded. Isolated runs hit StackOverflowError (sometimes inside XMLStringBuffer's initializer) and ConfigurationTest.testSuiteRunnerWithDefaultConfiguration failed with status 1. Point the nested suite at a separate trivial sample so the SuiteRunner plus default listeners path from testng-team#2743 actually terminates. Fixes testng-team#3360
5596ba9 to
d2fef87
Compare
Summary
SuiteRunnerIssueTestSamplebuilt a nestedXmlSuitewhose onlyXmlClasswas itself. Running the sample re-enteredsuiteRunnerSampleunbounded, hitStackOverflowError(sometimes insideXMLStringBuffer's static initializer), and leftConfigurationTest.testSuiteRunnerWithDefaultConfigurationfailing with status 1 when run in isolation.The nested suite now points at a separate trivial sample so the
SuiteRunnerplus default listeners path from #2743 actually terminates.Fixes #3360
Test plan
./gradlew :testng-core:test --tests test.configuration.ConfigurationTest.testSuiteRunnerWithDefaultConfiguration— RED (expected: 0 but was: 1) then GREEN (1/1)./gradlew :testng-core:test --tests test.configuration.ConfigurationTest— 19/19 GREEN./gradlew autostyleCheckGREEN./gradlew rewriteDryRun— recipes would make no changesSummary by CodeRabbit