Skip to content

Improve test reliability #488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 15, 2021
Merged

Conversation

axelson
Copy link
Member

@axelson axelson commented Feb 14, 2021

Add tags to allow running only some of the tests

  • mix test --only fixture to run only the tests that use our custom
    in_fixture helper
  • mix test --exclude slow to exclude extra slow tests (primarily dialyzer)
  • Fix a race-condition that showed up in some debugger tests
    • Without this fix (which admittedly is hacky) the "notifies about process exit" debugger test would fail about 1/4 of the time.
  • Capture output and logs from debugger tests
    • Otherwise that output would make it more difficult to read the test output
  • Rename the error raised in debugger tests to make it more obvious that these are test-specific errors and not a generic ArgumentError (which could be raised for multiple reasons)
  • Increase timeout for build diagnostics test
  • Use start_supervised! to ensure that processes finish before next test

Add tags to allow running only some of the tests
- `mix test --only fixture` to run only the tests that use our custom
  in_fixture helper
- `mix test --exclude slow` to exclude extra slow tests (primarily dialyzer)
- Fix a race-condition that showed up in some debugger tests
  - Without this fix (which admittedly is hacky) the "notifies about
    process exit" debugger test would fail about 1/4 of the time.
- Capture output and logs from debugger tests
  - Otherwise that output would make it more difficult to read the test output
- Rename the error raised in debugger tests to make it more obvious that
  these are test-specific errors and not a generic ArgumentError (which
  could be raised for multiple reasons)
Intent is to fix this test error:

    1) test put_chars mfa mfa binary (ElixirLS.Utils.OutputDeviceTest)
  Error:      test/output_device_test.exs:175
       ** (MatchError) no match of right hand side value: {:error, {:already_started, #PID<0.484.0>}}
       stacktrace:
         test/output_device_test.exs:72: ElixirLS.Utils.OutputDeviceTest.__ex_unit_setup_0/1
         test/output_device_test.exs:1: ElixirLS.Utils.OutputDeviceTest.__ex_unit__/2

https://github.com/elixir-lsp/elixir-ls/pull/488/checks?check_run_id=1899187694
@axelson axelson merged commit 0e932ca into elixir-lsp:master Feb 15, 2021
@axelson axelson deleted the improve-test-reliability branch February 15, 2021 02:44
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