Skip to content

Commit

Permalink
Fix flaky Gitimport integration test
Browse files Browse the repository at this point in the history
Summary:
The `test-gitimport-with-non-standard-file-mode.t` test was created to test an error condition and how gitimport behaves in such a case. However, since this test was created we added retries to every error in gitimport to provide more resilience to the gitimport process. Owning to those retries, sometimes the expected error message in this test ends up including a retry statement like `retrying attempt 2 of 4...` which ends up making the test flaky.

This diff modifies the test to print only the top 6 lines so we don't even allow the retry line to get included as part of the test output.

Reviewed By: YousefSalama

Differential Revision: D67522222

fbshipit-source-id: f71097061157ce7ddde67fb52f4b18be9dc0c50d
  • Loading branch information
RajivTS authored and facebook-github-bot committed Dec 20, 2024
1 parent 66aa638 commit 09fab49
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@
$ git rev-list --objects --all | git cat-file --batch-check='%(objectname) %(objecttype) %(rest)' | sort > $TESTTMP/object_list

# Import it into Mononoke
$ with_stripped_logs gitimport "$GIT_REPO_ORIGIN" --derive-hg --generate-bookmarks full-repo
$ with_stripped_logs gitimport "$GIT_REPO_ORIGIN" --derive-hg --generate-bookmarks full-repo | head -6
using repo "repo" repoid RepositoryId(0)
Execution error: gitimport failed

Caused by:
0: find_file_changes
1: Encountered non-standard file mode 0o100744 for file file2 with Object ID f138820097c8ef62a012205db0b1701df516f6d5
Error: Execution failed

0 comments on commit 09fab49

Please sign in to comment.