Skip to content

Commit

Permalink
Enable pushrebase for large repo in all integration tests
Browse files Browse the repository at this point in the history
Summary: pushrebase is not enabled for the large repo, so tests where we call `commit_to_large_repo` two consecutive times are very flaky.

Reviewed By: andreacampi

Differential Revision: D64398797

fbshipit-source-id: e7906088e97c871092254698027d4137890a2c92
  • Loading branch information
gustavoavena authored and facebook-github-bot committed Oct 16, 2024
1 parent 51a884e commit 3838723
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ Add more commits to small repo
X Repo Sync execution finished from small repo small_repo to large repo large_repo

$ clone_and_log_large_repo "ccfdf094e4710a77de7b36c4324fa7ee64dafba4067726e383db62273553466b"
abort: destination 'large_repo' is not empty
o 71fdac6141e7 D
│ smallrepofolder1/bar/c.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ function sl_log() {
function clone_and_log_large_repo {
LARGE_BCS_IDS=( "$@" )
cd "$TESTTMP" || exit
hg clone -q mono:$LARGE_REPO_NAME "$LARGE_REPO_NAME"
cd "$LARGE_REPO_NAME" || exit
clone_large_repo

cd "$LARGE_REPO_NAME" || exit

for LARGE_BCS_ID in "${LARGE_BCS_IDS[@]}"; do
LARGE_CS_ID=$(mononoke_newadmin convert --from bonsai --to hg -R "$LARGE_REPO_NAME" "$LARGE_BCS_ID" --derive)
Expand All @@ -186,3 +186,14 @@ function clone_and_log_large_repo {
-i "$LARGE_BCS_ID" 2>&1| rg "Error" || true # filter to keep only Error line if there is an error
done
}

# Clone the large repo if it hasn't been cloned yet
function clone_large_repo {
orig_pwd=$(pwd)
cd "$TESTTMP" || exit
if [ ! -d "$LARGE_REPO_NAME" ]; then
hg clone -q "mono:$LARGE_REPO_NAME" "$LARGE_REPO_NAME"
fi

cd "$orig_pwd" || exit
}

0 comments on commit 3838723

Please sign in to comment.