Skip to content

Minor test updates for db-panel.test#2802

Merged
norascheuch merged 4 commits intomainfrom
nora/minor-integration-test-improvement
Sep 28, 2023
Merged

Minor test updates for db-panel.test#2802
norascheuch merged 4 commits intomainfrom
nora/minor-integration-test-improvement

Conversation

@norascheuch
Copy link
Copy Markdown
Contributor

During investigations into a new code-search integration test some minor updates were found worth keeping.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@norascheuch norascheuch requested a review from a team as a code owner September 11, 2023 12:32
@norascheuch norascheuch force-pushed the nora/minor-integration-test-improvement branch from 448c699 to 8f4f391 Compare September 11, 2023 12:36
Comment on lines +24 to +28
// This test has some serious problems:
// a) it runs twice: we couldn't find out why
// b) all tests use the same dbConfig file, hence the tests depend on ORDER and have to use the same list name!
// c) since we use a file watcher to update the config we sometimes need to wait (sleep) before accessing the config again
// d) we depend on highlighted list items when adding a repo to a list. If there's not enough time in between, a test might think a list is highlighted that doesn't exist anymore
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these apply anymore. If there are still some that apply, I think it would be better to create a tech debt issue; I think documenting tech debt in comments can quickly lead to outdated comments or us losing track of this.

Copy link
Copy Markdown
Contributor Author

@norascheuch norascheuch Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this is still very much valid. It cost me a lot of time to figure all these tings out because they were not documented. Charis mentioned in the initial integration test PR that we should've had a comment there from the start #2690 (comment)
I think we're not intending to change this atm as well (so that a tech-dept issue wouldn't be a good place to store the information as well..).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this is useful information to have. I think we can leave in points b and d, but I think we can remove points a and c:

  • For point a, this is probably not specific to this test. If I run these tests using the CLI, I don't get duplicate test runs (npm run test:vscode-integration:activated-extension -- --runTestsByPath test/vscode-tests/activated-extension/databases/db-panel.test.ts)
  • For point c, I don't see any sleep commands in the tests

Copy link
Copy Markdown
Contributor Author

@norascheuch norascheuch Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I just copy and pasted my initial comment without checking it again. Will make the changes you're suggesting!

@norascheuch norascheuch force-pushed the nora/minor-integration-test-improvement branch from 8f4f391 to 9aff989 Compare September 28, 2023 08:18
@norascheuch norascheuch merged commit ecbc458 into main Sep 28, 2023
@norascheuch norascheuch deleted the nora/minor-integration-test-improvement branch September 28, 2023 10:16
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.

2 participants