[fix] Handle skipped Selenium tests in Django parallel runner#620
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
🧰 Additional context used📓 Path-based instructions (1)**/*.{py,html,txt}📄 CodeRabbit inference engine (Custom checks)
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: 2026-03-14T20:44:14.568ZApplied to files:
📚 Learning: 2026-03-14T20:44:14.568ZApplied to files:
📚 Learning: 2026-03-14T20:44:14.568ZApplied to files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughThe changes fix a crash that occurs when skipped Selenium tests run under Django's parallel test runner. The fix modifies skip propagation logic in Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
@asmodehn Should I push the changes ? |
|
I pushed the cleanup changes for the agreed review points:
I kept the |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
hi @nemesifier
All Green |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 13978 🏁 Script executed: Length of output: 37 🌐 Web query: 💡 Result: In Django’s parallel test runner, the subprocess uses
|
|
Follow-up pushed. The event-log corruption concern was correct: the skip path was overwriting the shared I removed that overwrite, record |
|
Hi @nemesifier @asmodehn . All changes addressed, please review once you have the time |
|
@nemesifier could you take a look, this addresses the selenium test issue and it unlocks failing CIs of the other issues |
nemesifier
left a comment
There was a problem hiding this comment.
Code looks good but manual testing is needed before confirming and merging.
asmodehn
left a comment
There was a problem hiding this comment.
Looks like a good and clean set of changes with matching test. Thanks !
@nemesifier , please take a look when you have the time |
|
@nemesifier |
nemesifier
left a comment
There was a problem hiding this comment.
I did some minor changes, the most important one being to always call original_result.stopTest(self) when the test has to be skipped, while before this call was conditional, which didn't make sense: if it's skipped it should be always be stopped, right? Let me know if that's not the case @czarflix @asmodehn.
I think this change is correct. The key point is that So I don’t see a case where a propagated skip on |
Checklist
Reference to Existing Issue
Closes #619.
Description of Changes
openwisp-utils#570fixed skipped Selenium tests by propagating skips fromresult.skipped.That works for standard unittest results, but it breaks under Django's parallel test runner because
RemoteTestResult.skippedis a truthyDummyList, which is not iterable. In that case, skip information is recorded inresult.events.This patch keeps the serial skip behavior introduced by
#570and fixes the parallel case by reading skip reasons fromresult.eventswhen available, while falling back toresult.skippedfor standard results.It also adds focused regression coverage for both result types:
TestResultRemoteTestResultVerification
I verified locally with:
./run-qa-checkspython tests/manage.py test test_project.tests.test_selenium_mixintest_project.tests.test_selenium_mixinunder Django4.2,5.0,5.1, and5.2I also checked the behavior around
#570directly:#570, skipped Selenium tests were incorrectly reported as successful#570fixed serial skip propagation but crashes under the parallel result typeScreenshot
N/A