libgit2 / libgit2/libgit2sharp
Unstable tests based on AssertRefLogEntry
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Several tests are unstable and fail all too frequently on CI and perhaps locally.
From this run of this commit the windows agent happened to fail with this log:
X LibGit2Sharp.Tests.BranchFixture.CanCreateBranchFromCommit [63ms]
Error Message:
Assert.InRange() Failure
Range: (1/31/2020 4:54:25 AM +00:00 - 1/31/2020 4:54:25 AM +00:00)
Actual: 1/31/2020 4:54:24 AM +00:00
Stack Trace:
at LibGit2Sharp.Tests.TestHelpers.BaseFixture.AssertRefLogEntry(IRepository repo, String canonicalName, String message, ObjectId from, ObjectId to, Identity committer, DateTimeOffset before) in D:\a\libgit2sharp\libgit2sharp\LibGit2Sharp.Tests\TestHelpers\BaseFixture.cs:line 471
at LibGit2Sharp.Tests.BranchFixture.CanCreateBranchFromCommit() in D:\a\libgit2sharp\libgit2sharp\LibGit2Sharp.Tests\BranchFixture.cs:line 205
It looks to me like the before local variable is still set to a later value than is recorded in the commit at times, for whatever reason.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AssertRefLogEntry in LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs and the failing CanCreateBranchFromCommit test in LibGit2Sharp.Tests/BranchFixture.cs. Run the affected test repeatedly, inspect the referenced CI failure, and compare the expected and recorded reflog timestamps. Done means the affected tests no longer fail intermittently in CI or locally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100