Fix flaky tests for ASM (#14478)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run

`mem_cluster_slot_migration_output_buffer` and
`mem_cluster_slot_migration_input_buffer` is transient, it will be reset
on disconnect when ASM task is failed or done. Actually for these
conditions, we just want to verify the metrics are accessible.

Failed CI job:
https://github.com/redis/redis/actions/runs/18859697064/job/53815311358
This commit is contained in:
Yuan Wang 2025-10-28 15:13:16 +08:00 committed by GitHub
parent f74b04f563
commit 0cbdc8eb37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -790,12 +790,8 @@ start_cluster 3 3 {tags {external:skip cluster} overrides {cluster-node-timeout
# Start the slot 0 write load on the R 0
set load_handle [start_write_load "127.0.0.1" [get_port 0] 100 $slot0_key 1000]
# wait for buffer to accumulate on source side (more than 1m)
wait_for_condition 1000 10 {
[S 0 mem_cluster_slot_migration_output_buffer] > 1000000
} else {
fail "Failed to wait for buffer to accumulate on source side (more than 1m)"
}
# verify the metric is accessible, it is transient, will be reset on disconnect
assert {[S 0 mem_cluster_slot_migration_output_buffer] >= 0}
# After some time, the client output buffer limit should be reached
wait_for_log_messages 0 {"*Client * closed * for overcoming of output buffer limits.*"} $loglines 1000 10
@ -836,7 +832,8 @@ start_cluster 3 3 {tags {external:skip cluster} overrides {cluster-node-timeout
# verify the peak value, should be greater than 1mb
assert {[S 0 mem_cluster_slot_migration_input_buffer_peak] > 1000000}
assert {[S 0 mem_cluster_slot_migration_input_buffer] > 1000000}
# verify the metric is accessible, it is transient, will be reset on disconnect
assert {[S 0 mem_cluster_slot_migration_input_buffer] >= 0}
wait_for_asm_done