[master] fac13e9 now for real: make newly introduced vtcs less timing-critical

Nils Goroll nils.goroll at uplex.de
Mon Sep 12 14:23:14 CEST 2016


commit fac13e90ff3b126ea7ddcba074dceb70cfa7e04b
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Sep 12 14:22:11 2016 +0200

    now for real: make newly introduced vtcs less timing-critical
    
    Follow-up 9095c5cfbac7fa3cb48257f6631f24239b30ee45
    
    Belongs to #2057

diff --git a/bin/varnishtest/tests/c00011.vtc b/bin/varnishtest/tests/c00011.vtc
index 758c35b..02dd470 100644
--- a/bin/varnishtest/tests/c00011.vtc
+++ b/bin/varnishtest/tests/c00011.vtc
@@ -28,8 +28,10 @@ client c1 {
 	expect resp.status == 200
 	expect resp.bodylen == 6
 	expect resp.http.x-varnish == "1001"
-	expect resp.http.o_age ~ "^0"
-	expect resp.http.o_ttl == "120.000"
+	expect resp.http.o_age >= 0
+	expect resp.http.o_age < 0.5
+	expect resp.http.o_ttl > 119.5
+	expect resp.http.o_ttl <= 120
 	expect resp.http.o_grace == "10.000"
 	expect resp.http.o_keep == "0.000"
 
@@ -38,8 +40,10 @@ client c1 {
 	expect resp.status == 200
 	expect resp.bodylen == 7
 	expect resp.http.x-varnish == "1003"
-	expect resp.http.o_age ~ "^0"
-	expect resp.http.o_ttl == "120.000"
+	expect resp.http.o_age >= 0
+	expect resp.http.o_age < 0.5
+	expect resp.http.o_ttl > 119.5
+	expect resp.http.o_ttl <= 120
 	expect resp.http.o_grace == "10.000"
 	expect resp.http.o_keep == "0.000"
 }
diff --git a/bin/varnishtest/tests/c00012.vtc b/bin/varnishtest/tests/c00012.vtc
index a45b291..9f64f68 100644
--- a/bin/varnishtest/tests/c00012.vtc
+++ b/bin/varnishtest/tests/c00012.vtc
@@ -28,8 +28,10 @@ client c1 {
 	expect resp.status == 200
 	expect resp.bodylen == 6
 	expect resp.http.x-varnish == "1001"
-	expect resp.http.o_age ~ "^0"
-	expect resp.http.o_ttl ~ "^-0"
+	expect resp.http.o_age >= 0
+	expect resp.http.o_age < 0.5
+	expect resp.http.o_ttl <= -0
+	expect resp.http.o_ttl > -0.5
 	expect resp.http.o_grace == "0.000"
 	expect resp.http.o_keep == "0.000"
 
@@ -38,8 +40,10 @@ client c1 {
 	expect resp.status == 200
 	expect resp.bodylen == 7
 	expect resp.http.x-varnish == "1003"
-	expect resp.http.o_age ~ "^0"
-	expect resp.http.o_ttl ~ "^-0"
+	expect resp.http.o_age >= 0
+	expect resp.http.o_age < 0.5
+	expect resp.http.o_ttl <= -0
+	expect resp.http.o_ttl > -0.5
 	expect resp.http.o_grace == "0.000"
 	expect resp.http.o_keep == "0.000"
 }



More information about the varnish-commit mailing list