Flakey test fixes - #5520
Conversation
Updated summary comment to clarify the purpose of the MapIds method.
📝 WalkthroughWalkthroughChangesDungeon generation
Integration test maintenance
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Content.IntegrationTests/Tests/GameRules/AntagGhostRoleTest.cs (1)
99-151: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winMake temporary-map cleanup failure-safe in all three tests.
The current cleanup runs only after successful assertions. Any exception before cleanup can leave temporary maps loaded and recreate the memory-growth problem this PR addresses.
Content.IntegrationTests/Tests/GameRules/AntagGhostRoleTest.cs#L99-L151: move rule clearing and snapshot-based map deletion intofinally.Content.IntegrationTests/Tests/GameRules/AntagGhostRoleTest.cs#L164-L195: apply the samefinallycleanup to the sequential test.Content.IntegrationTests/Tests/PostMapInitTest.cs#L257-L272: delete the explicitly created map fromfinallyafter confirming that map creation succeeded.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Content.IntegrationTests/Tests/GameRules/AntagGhostRoleTest.cs` around lines 99 - 151, Make temporary-map cleanup failure-safe in AntagGhostRoleTest.cs lines 99-151 and 164-195 by wrapping each test body’s rule clearing and snapshot-based map deletion in a finally block. In PostMapInitTest.cs lines 257-272, place deletion of the explicitly created map in finally after confirming creation succeeded; preserve the existing assertions and cleanup behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@Content.IntegrationTests/Tests/GameRules/AntagGhostRoleTest.cs`:
- Around line 99-151: Make temporary-map cleanup failure-safe in
AntagGhostRoleTest.cs lines 99-151 and 164-195 by wrapping each test body’s rule
clearing and snapshot-based map deletion in a finally block. In
PostMapInitTest.cs lines 257-272, place deletion of the explicitly created map
in finally after confirming creation succeeded; preserve the existing assertions
and cleanup behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 9eabc4c0-34d3-43b4-8ccb-430b7b976948
📒 Files selected for processing (4)
Content.IntegrationTests/Tests/GameRules/AntagGhostRoleTest.csContent.IntegrationTests/Tests/PostMapInitTest.csContent.IntegrationTests/Tests/_Starlight/Round/CharacterSelectionTest.csContent.Server/Procedural/DungeonJob/DungeonJob.DunGenPrefab.cs
|
jobweighttest also needs to be fixed again I suppose |
3f58e5d
## Short description Fixes a few tests ## Why we need to add this Dungeons needed to be updated to allow for non-standard sizes without causing errors. SovietDungeonWeh has a 17x9 room and a 17x5 room that was causing errors. AntagGhostRoles Never removed its maps, causing massive memory usage, same with PostMapInit. CharacterSelectionTest.cs created tests with the same names. Doing damage to a body while it's being deleted causes an error ## Checks <!-- check boxes for faster reviewing of your PR --> - [X] I do not require assistance to complete the PR. - [X] Before posting/requesting review of a PR, I have verified that the changes work. - [X] I have added screenshots/videos of the changes, or this PR does not change in-game mechanics. - [X] I affirm that my changes are licensed under the [MIT License](https://github.com/ss14Starlight/space-station-14/blob/Starlight/LICENSE.TXT) and grant permission for use in this repository under its conditions.
## Short description Fixes a few tests ## Why we need to add this Dungeons needed to be updated to allow for non-standard sizes without causing errors. SovietDungeonWeh has a 17x9 room and a 17x5 room that was causing errors. AntagGhostRoles Never removed its maps, causing massive memory usage, same with PostMapInit. CharacterSelectionTest.cs created tests with the same names. Doing damage to a body while it's being deleted causes an error ## Checks <!-- check boxes for faster reviewing of your PR --> - [X] I do not require assistance to complete the PR. - [X] Before posting/requesting review of a PR, I have verified that the changes work. - [X] I have added screenshots/videos of the changes, or this PR does not change in-game mechanics. - [X] I affirm that my changes are licensed under the [MIT License](https://github.com/ss14Starlight/space-station-14/blob/Starlight/LICENSE.TXT) and grant permission for use in this repository under its conditions.
Short description
Fixes a few tests
Why we need to add this
Dungeons needed to be updated to allow for non-standard sizes without causing errors. SovietDungeonWeh has a 17x9 room and a 17x5 room that was causing errors.
AntagGhostRoles Never removed its maps, causing massive memory usage, same with PostMapInit.
CharacterSelectionTest.cs created tests with the same names.
Doing damage to a body while it's being deleted causes an error
Checks