Skip to content

Relax LooseObjectStepTests from exact object counts#1162

Merged
derrickstolee merged 1 commit intomicrosoft:masterfrom
derrickstolee:loose-object-step-test-relax
May 15, 2019
Merged

Relax LooseObjectStepTests from exact object counts#1162
derrickstolee merged 1 commit intomicrosoft:masterfrom
derrickstolee:loose-object-step-test-relax

Conversation

@derrickstolee
Copy link
Contributor

We are having some flaky tests because somtimes we get one too many or one too few loose objects in our LooseObjectStepTests. The only reason this can happen (as I see it) is that we are downloading a loose object due to the virtualization layer, and that file exists in a pack somehow. This causes us to delete or add an object during the LooseObjectsStep and have off-by-one errors. Instead of seeing 160 objects (for example) we see 159 or 161.

Relax the test conditions to verify that we did not delete all of the loose objects during the steps instead of requiring the count is exact. (We already relaxed this in one direction in #1116.)

@derrickstolee derrickstolee added the type: test-reliability Issues that contribute to test failures label May 15, 2019
@derrickstolee derrickstolee marked this pull request as ready for review May 15, 2019 14:57
@derrickstolee derrickstolee requested a review from jeschu1 May 15, 2019 14:57
@derrickstolee
Copy link
Contributor Author

Marking as ready for review since I had five functional test runs succeed. Happy to run more, if we want to.

@derrickstolee derrickstolee merged commit 315a302 into microsoft:master May 15, 2019
@jrbriggs jrbriggs added this to the M153 milestone May 24, 2019
derrickstolee added a commit that referenced this pull request May 24, 2019
… LooseObjectStepTests

When making the tests more flexible in #1162, I missed one instance. To
be sure I didn't miss any more, I removed all use of the
exact loose object count.
derrickstolee added a commit that referenced this pull request May 29, 2019
…nmounting

These tests have been super-flaky and frustrating. After weakening the tests, but still finding places where the loose object count is not deterministic, I thought it was worth starting over with the full list of exact-count assertions. To avoid loose objects being added or dropped from the counts in unexpected ways, now we unmount the repo before counting the objects.

I ran the functional tests 20 times on this PR and only one failure, but it was in the `GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitReadAndGitLockTests.GitAliasNamedAfterKnownCommandAcquiresLock()` test, unrelated to this change.

Replaces #1162, #1198, #1116.

Fixes #1201.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: tests type: test-reliability Issues that contribute to test failures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants