Skip to content

Commit 7a3fab4

Browse files
committed
chore(windows): Fix tests CS stop reliability
Recently, some tests have been observed to fail on Windows client CI due to the chunkserver stop command related operations not taking effect immediately, which causes these tests to be flaky. To mitigate this issue, a short sleep is added after stopping the chunkserver to ensure that the stop command and its subsequent operations have taken effect before proceeding with the test operations. Co-authored-by: Dave <dave@leil.io> Signed-off-by: rolysr <rolysr@leil.io>
1 parent 5b31b79 commit 7a3fab4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tests/test_suites/ShortSystemTests/test_ec_read_combinations.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ for i in {0..7}; do
1616
for cs in {0..2}; do
1717
saunafs_chunkserver_daemon $(((i + cs) % 8)) stop
1818
done
19+
saunafs_wait_for_ready_chunkservers 6
1920
if ! file-validate "$dir/file"; then
2021
test_add_failure "Data read from file without chunkservers $i-$(((i + cs) % 8)) is different than written"
2122
fi

tests/test_suites/ShortSystemTests/test_truncate_retry.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ FILE_SIZE=1234 file-generate file
1313
checksum123="$(head -c 123 file | md5sum)"
1414

1515
saunafs_chunkserver_daemon 0 stop
16+
saunafs_wait_for_ready_chunkservers 0
1617
assert_awk_finds '/no valid copies/' "$(saunafs fileinfo file)"
1718
# Following operation should pass - wake up just after 4th try (0.2 + 0.4 + 0.8 + 1.6 = 3.0s)
1819
(sleep 3.1 && saunafs_chunkserver_daemon 0 start) & truncate -s 123 file
1920
assert_awk_finds '/[0-9A-F]+_00000002/' "$(saunafs fileinfo file)"
2021
assert_equals "$checksum123" "$(cat file | md5sum)"
2122

2223
saunafs_chunkserver_daemon 0 stop
24+
saunafs_wait_for_ready_chunkservers 0
2325
assert_awk_finds '/no valid copies/' "$(saunafs fileinfo file)"
2426
# Following operation shouldn't pass - waiting time's exceeded
2527
sleep 12.7 && saunafs_chunkserver_daemon 0 start &

0 commit comments

Comments
 (0)