libgit2 / libgit2/libgit2sharp

RenamingABranchIncludesTheCorrectReflogEntries occasionally fails the range check

Open
#1,186 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

Occasionally it happens to me that the Branch Renaming reflog test fails with following error message

 LibGit2Sharp.Tests.BranchFixture.RenamingABranchIncludesTheCorrectReflogEntries: 
     Assert.InRange() Failure
     Range:  (08.09.2015 14:10:34 +02:00 - 08.09.2015 14:10:34 +02:00)
     Actual: 08.09.2015 14:10:33 +02:00

It seems the range's From is off by a second. This behaviour appears only sporadically. As of now I only reproduced this on Ubuntu with Mono-4.0.0.0

The behaviour shows both when running the XUnit Tests from mondevelop as well as when running build.libgit2sharp.sh, but usually disappears when rerunning the test

Behaviour was noticed when working on #1185

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RenamingABranchIncludesTheCorrectReflogEntries test, which intermittently fails its timestamp range check on Ubuntu with Mono. Reproduce it through the xUnit tests or build.libgit2sharp.sh, then inspect how the test defines and compares the range. Done means the test passes reliably without masking genuine reflog timing errors.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.