Skip to content
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

Put TraceLoggerFactoryTests into non-parallel collection #38

Merged

Conversation

DaveyJonesBitPail
Copy link
Contributor

@DaveyJonesBitPail DaveyJonesBitPail commented Nov 23, 2023

Description

There is an unstable test https://github.com/ZEISS/czicompress/actions/runs/6969814480/job/18966499474?pr=33 that is presumably caused by running our tests in parallel.

This change will move the TraceLoggerFactoryTests into their own collection with Parallelization disabled. This ought to run the other parallel-capable tests first and then run the TraceLoggerFactory tests sequentially. (see https://xunit.net/docs/running-tests-in-parallel for details)

  • TraceLoggerFactoryTests and AppComposerTests have both been added to their own collection.
  • External CollectionDefinition classes added for above classes

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This has been tested locally and I will be keeping an eye on the actions for this PR as well to see if the issue in question is indeed resolved.

Checklist:

  • I followed the Contributing Guidelines.
  • I did a self-review.
  • I commented my code, particularly in hard-to-understand areas.
  • I updated the documentation.
  • I updated the version of czicompress following the README (Versioning) depending on the type of change
    • Bug fix -> PATCH
    • New feature -> MINOR
    • Breaking change -> MAJOR
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@DaveyJonesBitPail DaveyJonesBitPail added cla Contributor License Agreement sent to Admin bug Something isn't working test The issue is about automated tests or testing labels Nov 23, 2023
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Merging #38 (fcf8f88) into main (fa6f38d) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #38   +/-   ##
=======================================
  Coverage   77.64%   77.64%           
=======================================
  Files          58       58           
  Lines        1897     1897           
  Branches      121      121           
=======================================
  Hits         1473     1473           
  Misses        401      401           
  Partials       23       23           
Components Coverage Δ
czicompress 66.75% <ø> (ø)
czishrink 80.39% <ø> (ø)

@DaveyJonesBitPail DaveyJonesBitPail marked this pull request as ready for review November 23, 2023 13:50
@DaveyJonesBitPail DaveyJonesBitPail requested a review from a team November 23, 2023 13:52
@m-ringler
Copy link
Contributor

We should probably do the same thing for AppComposerTests which might be the other culprit, here. The page you linked says there must be another test class involved to produce a race condition. And AppcomposerTests also uses a TraceLoggerFactory (via sut).

@m-ringler
Copy link
Contributor

Afais the proper way to do this is a tad more complicated: see here xunit/xunit#1999 (comment)

Copy link
Contributor

@m-ringler m-ringler left a comment

Choose a reason for hiding this comment

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

See my other comments.

Copy link
Contributor

@m-ringler m-ringler left a comment

Choose a reason for hiding this comment

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

I think we could have put them in one NotTheadSafeCollection, but two collections should also be OK

@DaveyJonesBitPail DaveyJonesBitPail merged commit a45afcc into main Nov 27, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla Contributor License Agreement sent to Admin test The issue is about automated tests or testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants