Skip to content

Unstable tests based on AssertRefLogEntry #1764

Open
@AArnott

Description

@AArnott

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions