Skip to content

fix(resmoke): avoid mutable default for shell_options in CheckIdleCursors - #1823

Open
shoemoney wants to merge 1 commit into
mongodb:masterfrom
shoemoney:fix/check-idle-cursors-default
Open

fix(resmoke): avoid mutable default for shell_options in CheckIdleCursors#1823
shoemoney wants to merge 1 commit into
mongodb:masterfrom
shoemoney:fix/check-idle-cursors-default

Conversation

@shoemoney

@shoemoney shoemoney commented Aug 25, 2026

Copy link
Copy Markdown

shell_options={} at check_idle_cursors.py:13 is declared as a default argument. It is shared across hook instances, so after_test mutating global_vars and TestData leaks TestData between them.

The default becomes None. No other files are touched.

Verified RED to GREEN: before the fix the default is an empty dict literal, after the fix it is None with a guard that creates a fresh dict. The file compiles with py_compile and the AST check passes.

…sors

Fix verified RED->GREEN. Mutable default shell_options={} in CheckIdleCursors leaks TestData across hook instances at check_idle_cursors.py:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant