Skip to content

Commit b1c6ed4

Browse files
committed
Merge branch 'ps/reftable-concurrent-writes'
Test fix. * ps/reftable-concurrent-writes: t0610: work around flaky test with concurrent writers
2 parents d30c2c4 + 7355574 commit b1c6ed4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

t/t0610-reftable-basics.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,15 +450,22 @@ test_expect_success 'ref transaction: retry acquiring tables.list lock' '
450450
)
451451
'
452452

453-
test_expect_success 'ref transaction: many concurrent writers' '
453+
# This test fails most of the time on Windows systems. The root cause is
454+
# that Windows does not allow us to rename the "tables.list.lock" file into
455+
# place when "tables.list" is open for reading by a concurrent process.
456+
test_expect_success !WINDOWS 'ref transaction: many concurrent writers' '
454457
test_when_finished "rm -rf repo" &&
455458
git init repo &&
456459
(
457460
cd repo &&
458-
# Set a high timeout such that a busy CI machine will not abort
459-
# early. 10 seconds should hopefully be ample of time to make
460-
# this non-flaky.
461-
git config set reftable.lockTimeout 10000 &&
461+
# Set a high timeout. While a couple of seconds should be
462+
# plenty, using the address sanitizer will significantly slow
463+
# us down here. So we are aiming way higher than you would ever
464+
# think is necessary just to keep us from flaking. We could
465+
# also lock indefinitely by passing -1, but that could
466+
# potentially block CI jobs indefinitely if there was a bug
467+
# here.
468+
git config set reftable.lockTimeout 300000 &&
462469
test_commit --no-tag initial &&
463470
464471
head=$(git rev-parse HEAD) &&

0 commit comments

Comments
 (0)