Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Various unit test fixes. #1997

Merged
merged 14 commits into from
Oct 24, 2018
Merged

Various unit test fixes. #1997

merged 14 commits into from
Oct 24, 2018

Conversation

grokys
Copy link
Contributor

@grokys grokys commented Oct 18, 2018

Various unit test fixes:

  • Applies Don't register MainThreadScheduler when in unit tests. editor-tools/ReactiveUI#1 to our ReactiveUI submodule. This makes tests run a lot more stably (at least in ncrunch, should also improve other test runners too)
    • This means we can remove the TestUtils.WithScheduler(Scheduler.CurrentThread) hacks
  • Allow running tests in parallel in ncrunch (greatly speeds up test time)
  • Fix or ignore a load of CA warnings in unit test projects

grokys added 11 commits October 18, 2018 11:03
It should not be necessary.
Unit tests require a CurrentThreadScheduler to be used, RxUI's registrations were overriding that, causing intermittent test failures.
This should now work correctly, and greatly speeds up the tests.
Sometimes unit tests were failing to find the nativate libgit2sharp binaries under ncrunch. This fixes that.
Hopefully will be less flaky now?
@codecov
Copy link

codecov bot commented Oct 19, 2018

Codecov Report

Merging #1997 into master will decrease coverage by 1.41%.
The diff coverage is 37.5%.

@@            Coverage Diff             @@
##           master    #1997      +/-   ##
==========================================
- Coverage    41.7%   40.28%   -1.42%     
==========================================
  Files         373      405      +32     
  Lines       16126    17347    +1221     
  Branches     2211     2392     +181     
==========================================
+ Hits         6725     6988     +263     
- Misses       8890     9837     +947     
- Partials      511      522      +11
Impacted Files Coverage Δ
...ViewModels/GitHubPane/PullRequestCheckViewModel.cs 1.09% <0%> (ø) ⬆️
...Exports.Reactive/Collections/TrackingCollection.cs 90.92% <0%> (ø) ⬆️
src/GitHub.App/Services/StandardUserErrors.cs 64.92% <0%> (ø) ⬆️
...wModels/TeamExplorer/RepositoryPublishViewModel.cs 93.45% <100%> (ø) ⬆️
...p/ViewModels/Dialog/RepositoryCreationViewModel.cs 91.32% <100%> (ø) ⬆️
src/GitHub.App/Services/ModelService.cs 31.71% <50%> (ø) ⬆️
...ineReviews/Services/PullRequestStatusBarManager.cs 0% <0%> (ø) ⬆️
...rc/GitHub.VisualStudio/Commands/OpenLinkCommand.cs 0% <0%> (ø)
...Hub.VisualStudio/Commands/ShowGitHubPaneCommand.cs 0% <0%> (ø)
...o/Commands/GoToSolutionOrPullRequestFileCommand.cs 0% <0%> (ø)
... and 30 more

@grokys grokys changed the title WIP: Various unit test fixes. Various unit test fixes. Oct 19, 2018
Copy link
Collaborator

@jcansdale jcansdale left a comment

Choose a reason for hiding this comment

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

I can confirm this is working a lot better! 🎉

When I first tried it, I forget to update the ReactiveUI submodule and tests were breaking all over the place. Updating the submodule turned (almost) everything green!

We still have a troublesome FilterTitleRun2 flaky test. Shall we disable it at part of this PR?

image

Copy link
Collaborator

@jcansdale jcansdale left a comment

Choose a reason for hiding this comment

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

Just one suggested change. Merge at will....

@grokys grokys merged commit 9e37f36 into master Oct 24, 2018
@grokys grokys deleted the fixes/unit-tests branch October 24, 2018 12:58
grokys added a commit that referenced this pull request Oct 29, 2018
No longer needed after #1997.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants