Fix flaky FUSE integration tests

- concurrent_operations_test: Add retry loop for transient I/O errors
  on file close during ConcurrentDirectoryOperations
- git_operations_test: Wait for pushed objects to become visible through
  FUSE mount before cloning in Phase 3
This commit is contained in:
Chris Lu
2026-04-02 11:49:13 -07:00
parent 2a6f27eb08
commit 647b46bd8a
2 changed files with 17 additions and 3 deletions

View File

@@ -85,6 +85,13 @@ func testGitCloneAndPull(t *testing.T, mountPoint, localDir string) {
branch := gitOutput(t, localClone, "rev-parse", "--abbrev-ref", "HEAD")
gitRun(t, localClone, "push", "origin", branch)
// Wait for pushed objects to become visible through the FUSE mount.
// After git push, pack objects may not be immediately consistent on
// the FUSE layer, causing clone to fail with "nonexistent object".
waitForBareRepoEventually(t, bareRepo, 10*time.Second)
refreshDirEntry(t, bareRepo)
time.Sleep(1 * time.Second)
// ---- Phase 3: Clone from mount bare repo into on-mount working dir ----
t.Log("Phase 3: clone from mount bare repo to on-mount working dir")
gitRun(t, "", "clone", bareRepo, mountClone)