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
No related merge requests found
...@@ -3502,10 +3502,8 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s { ...@@ -3502,10 +3502,8 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
if pattern.match(line): if pattern.match(line):
matching_line_amount += 1 matching_line_amount += 1
# Caddy used between ATS and the backend received only one connection # Caddy used between ATS and the backend received maximum one connection
self.assertEqual( self.assertIn(matching_line_amount, [0, 1])
1,
matching_line_amount)
timeout = 5 timeout = 5
b = time.time() b = time.time()
...@@ -3540,10 +3538,8 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s { ...@@ -3540,10 +3538,8 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
break break
time.sleep(0.1) time.sleep(0.1)
# ATS has only one entry for this query # ATS has maximum one entry for this query
self.assertEqual( self.assertIn(matching_line_amount, [0, 1])
1,
matching_line_amount)
# the result is available immediately after # the result is available immediately after
result = fakeHTTPResult( 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