Skip to content

Make e2e tests deterministic instead of sleeping#53

Merged
AnHeuermann merged 1 commit into
OpenModelica:mainfrom
AnHeuermann:cache-vs-code
Jun 22, 2026
Merged

Make e2e tests deterministic instead of sleeping#53
AnHeuermann merged 1 commit into
OpenModelica:mainfrom
AnHeuermann:cache-vs-code

Conversation

@AnHeuermann

Copy link
Copy Markdown
Member

The language server initializes and parses documents asynchronously, so waiting a fixed amount of time after activation was racy: slow machines (CI) could still see empty provider results while fast machines wasted seconds.

  • Add executeProviderUntilResult() helper that polls a provider command until it returns a non-empty result (or times out)
  • Use it in the gotoDeclaration, mslLibrary, and symbolinformation tests
  • Drop the fixed sleep(5000) from activate() and document that the server is not guaranteed ready when it returns
  • Pin the VS Code test version to 'stable' and cache the download in CI for reproducible, faster runs
  • Ignore *.tsbuildinfo

The language server initializes and parses documents asynchronously, so
waiting a fixed amount of time after activation was racy: slow machines
(CI) could still see empty provider results while fast machines wasted
seconds.

- Add executeProviderUntilResult() helper that polls a provider command
  until it returns a non-empty result (or times out)
- Use it in the gotoDeclaration, mslLibrary, and symbolinformation tests
- Drop the fixed sleep(5000) from activate() and document that the
  server is not guaranteed ready when it returns
- Pin the VS Code test version to 'stable' and cache the download in CI
  for reproducible, faster runs
- Ignore *.tsbuildinfo

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AnHeuermann AnHeuermann self-assigned this Jun 22, 2026
@AnHeuermann AnHeuermann enabled auto-merge (squash) June 22, 2026 11:30
@AnHeuermann AnHeuermann merged commit c63ad2f into OpenModelica:main Jun 22, 2026
3 checks passed
@AnHeuermann AnHeuermann deleted the cache-vs-code branch June 22, 2026 11:30
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