Commit 74d38f2b authored by Łukasz Nowak's avatar Łukasz Nowak

Fix "caddy-frontend/test: Cover ATS cases for timeouts"

As timeout is the same on frontend caddy, ATS and backend caddy allow
0 or 1 accesses to the additional endpoints. The request might not reach
the backend caddy, and this is expected.
parent bd32bfbb
......@@ -3502,10 +3502,8 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
if pattern.match(line):
matching_line_amount += 1
# Caddy used between ATS and the backend received only one connection
self.assertEqual(
1,
matching_line_amount)
# Caddy used between ATS and the backend received maximum one connection
self.assertIn(matching_line_amount, [0, 1])
timeout = 5
b = time.time()
......@@ -3540,10 +3538,8 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
break
time.sleep(0.1)
# ATS has only one entry for this query
self.assertEqual(
1,
matching_line_amount)
# ATS has maximum one entry for this query
self.assertIn(matching_line_amount, [0, 1])
# the result is available immediately after
result = fakeHTTPResult(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment