close
Skip to content

Initialize test variables in setup to avoid order dependency.#226596

Merged
amunger merged 3 commits into
microsoft:mainfrom
rehmsen:order_dependent_test
Sep 3, 2024
Merged

Initialize test variables in setup to avoid order dependency.#226596
amunger merged 3 commits into
microsoft:mainfrom
rehmsen:order_dependent_test

Conversation

@rehmsen
Copy link
Copy Markdown
Contributor

@rehmsen rehmsen commented Aug 26, 2024

Some test cases reassign results, and when it is only initialized in the body of suite instead of in setup, a different ordering of test cases makes the test fail. The goal is for each test case to be independent of the others, so that they could be executed in any order. This test already uses setup for other variables, so I am assuming it was just an oversight not to have done this for results.

Fixes #226595.

…ncy.

Some test cases reassing `results`, and when it is only initialized in the body of `suite` instead of in `setup`, a different ordering of test cases makes the test fail. The goal is for each test case to be independent of the others, so that they could be executed in any order. This test already uses setup for other variables, so I am assuming it was just an oversight not to have done this for `results`.
@vs-code-engineering vs-code-engineering Bot added this to the September 2024 milestone Aug 30, 2024
@amunger amunger merged commit 1bed263 into microsoft:main Sep 3, 2024
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

notebookVariablesDataSource.test.ts test cases fail when reordered

4 participants