[master] 4aa8d31f9 vtc: Proper synchronization in r2422
Nils Goroll
nils.goroll at uplex.de
Tue May 20 09:15:05 UTC 2025
commit 4aa8d31f92283c154a8faeb7b56915015c0552f4
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon May 6 14:36:02 2024 +0200
vtc: Proper synchronization in r2422
diff --git a/bin/varnishtest/tests/r02422.vtc b/bin/varnishtest/tests/r02422.vtc
index a7e49315d..7a51689d2 100644
--- a/bin/varnishtest/tests/r02422.vtc
+++ b/bin/varnishtest/tests/r02422.vtc
@@ -1,11 +1,21 @@
varnishtest "long polling and low latency using req.ttl"
+# synchronizes the setup of all clients
+barrier b1 cond 2
+
+# makes c1..cN send their requests simultaneously-ish
+barrier b2 cond 7
+
+# synchronizes c4 with c5 and c6
+barrier b3 cond 3
+
server s1 {
# s1 uses the etag as a version
rxreq
txresp -hdr {Etag: "5"}
rxreq
+ barrier b3 sync
# wait until the new version is ready
delay 1
txresp -hdr {Etag: "6"}
@@ -30,12 +40,6 @@ varnish v1 -vcl+backend {
}
} -start
-# synchronizes the setup of all clients
-barrier b1 cond 2
-
-# makes c1..cN send their requests simultaneously-ish
-barrier b2 cond 7
-
client c0 {
# wait for all clients to be ready
barrier b1 sync
@@ -93,7 +97,7 @@ client c5 {
# up-to-date client, long polling
barrier b2 sync
# wait to make sure c4 gets the miss
- delay 0.2
+ barrier b3 sync
txreq -hdr {If-None-Match: "5"}
rxresp
expect resp.status == 200
@@ -105,7 +109,7 @@ client c6 {
# up-to-date client, long polling
barrier b2 sync
# wait to make sure c4 gets the miss
- delay 0.2
+ barrier b3 sync
txreq -hdr {If-None-Match: "5"}
rxresp
expect resp.status == 200
More information about the varnish-commit
mailing list