Skip to content

Own testsuite: race condition for test withResource #39

@andreasabel

Description

@andreasabel

Once in a while, you can see withResouce listed in the test report:

$ cabal test
Build profile: -w ghc-9.8.1 -O1
...
Building test suite 'test' for tasty-silver-3.3.1.2...
...
Test suite test: RUNNING...
tests
  showDiff:        showDiff-internal: FAIL (0.00s)
                   Result did not match golden value.
                   Diff between actual and golden value:
========================================
[-golden-]{+actual+} value
========================================

1 out of 1 tests failed (0.04s)
OK (0.05s)
tests
  findByExtension: OK (0.01s)
tests
  withResource:    OK (0.00s)
tests
  Filter.checkRF
    empty1a:       OK (0.00s)
  Filter.checkRF
    empty1b:       OK (0.00s)
  Filter.checkRF
    empty2a:       OK (0.00s)
  Filter.checkRF
    empty2b:       OK (0.00s)

All 7 tests passed (0.06s)

But usually, there is at most a misplaced OK or even nothing.

$ cabal test
...
tests
  showDiff:        showDiff-internal: FAIL (0.00s)
                   Result did not match golden value.
                   Diff between actual and golden value:
========================================
[-golden-]{+actual+} value
========================================

1 out of 1 tests failed (0.04s)
OK (0.04s)
tests
  findByExtension: OKOK (0.00s)
tests
  Filter.checkRF
    empty1a:       OK (0.00s)
  Filter.checkRF
    empty1b:       OK (0.00s)
  Filter.checkRF
    empty2a:       OK (0.00s)
  Filter.checkRF
    empty2b:       OK (0.00s)

All 7 tests passed (0.05s)
...

See

Metadata

Metadata

Assignees

No one assigned

    Labels

    consoleRegarding printing to console (colors, races, ...)testsuiteConcerning tasty-silver's own test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions