Problem
concurrent-make-test.bats intermittently fails during setup_file when build_test_repo_from_template runs git subtree add for the first environment (concurrent-single). The second environment (concurrent-multi) often succeeds in the same run.
Observed errors
Creating concurrent-single environment...
ERROR: build_test_repo_from_template: git subtree add failed
ERROR: build_test_repo_from_template: pgxntool/base.mk not found after adding pgxntool
ERROR: build_test_repo_from_template: setup.sh failed
ERROR: build_test_repo_from_template: Makefile not created by setup.sh
ERROR: build_test_repo_from_template: Failed to commit setup changes
What we know
- The pgxntool source repo is clean when this happens
- The two
build_test_repo_from_template calls are sequential, not parallel
- The actual git error is not visible —
git subtree add runs in a subshell and its stderr is captured by BATS (only shown on test failure, mixed in with other output)
- Not consistently reproducible — sometimes passes, sometimes fails
Suggested improvements
- Capture and display the
git subtree add stderr via error or debug so the actual git failure reason is visible
- Investigate whether filesystem timing (the
sleep 1 before subtree add) is insufficient on some systems
Problem
concurrent-make-test.batsintermittently fails duringsetup_filewhenbuild_test_repo_from_templaterunsgit subtree addfor the first environment (concurrent-single). The second environment (concurrent-multi) often succeeds in the same run.Observed errors
What we know
build_test_repo_from_templatecalls are sequential, not parallelgit subtree addruns in a subshell and its stderr is captured by BATS (only shown on test failure, mixed in with other output)Suggested improvements
git subtree addstderr viaerrorordebugso the actual git failure reason is visiblesleep 1before subtree add) is insufficient on some systems