Skip to content

Commit c6daeaf

Browse files
committed
more detailed comment
1 parent 14d3aac commit c6daeaf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/test-ghe-restore-parallel.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# ghe-restore command tests run in parallel
33
set -e
44

5-
# use tempdir to fix rsync file issues in parallel execution
6-
tempdir=$(mktemp -d -t backup-utils-restore-temp-XXXXXX)
7-
85
export GHE_PARALLEL_ENABLED=yes
9-
export GHE_EXTRA_RSYNC_OPTS="--copy-dirlinks --temp-dir=$tempdir" # handle symlink directories for tests
6+
7+
# use temp dir to fix rsync file issues in parallel execution:
8+
# we are imitating remote server by local files, and running rsync in parallel may cause
9+
# race conditions when two processes writing to same folder
10+
tempdir=$(mktemp -d -t backup-utils-restore-temp-XXXXXX)
11+
export GHE_EXTRA_RSYNC_OPTS="--copy-dirlinks --temp-dir=$tempdir"
1012

1113
TESTS_DIR="$PWD/$(dirname "$0")"
1214
# shellcheck source=test/test-ghe-restore.sh

0 commit comments

Comments
 (0)