Skip to content

Commit 7ca3b75

Browse files
committed
chore(windows): Fix tests CS stop reliability
Recently, the test test_truncate_retry has been observed to fail on the Windows client CI due to chunkserver stop operations not taking effect immediately. This delay causes the test to become flaky. To mitigate the issue, a short sleep has been added after stopping the chunkserver to ensure that the stop command and its subsequent operations have fully taken effect before the test proceeds. Additionally, the test test_ec_read_combinations was flaky because insufficient time was given for the file-generate utility to write all file chunk parts. This timing issue also caused intermittent failures on the Windows client CI. Co-authored-by: Dave <dave@leil.io> Signed-off-by: rolysr <rolysr@leil.io>
1 parent dd99f10 commit 7ca3b75

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/test_suites/ShortSystemTests/test_ec_read_combinations.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ dir="${info[mount0]}/dir"
1111
mkdir "$dir"
1212
saunafs setgoal ec "$dir"
1313
FILE_SIZE=876M file-generate "$dir/file"
14+
if is_windows_system; then
15+
sleep 0.1
16+
fi
1417

1518
for i in {0..7}; do
1619
for cs in {0..2}; do

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)