2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Merge branch '2724-statschannel-system-test-sometimes-hangs' into 'main'

Resolve "statschannel system test sometimes hangs"

Closes #2724

See merge request isc-projects/bind9!5123
This commit is contained in:
Mark Andrews
2021-06-02 22:37:10 +00:00
2 changed files with 8 additions and 4 deletions

View File

@@ -22,7 +22,8 @@ from helper import fmt
# JSON helper functions # JSON helper functions
def fetch_zones_json(statsip, statsport): def fetch_zones_json(statsip, statsport):
r = requests.get("http://{}:{}/json/v1/zones".format(statsip, statsport)) r = requests.get("http://{}:{}/json/v1/zones".format(statsip, statsport),
timeout=600)
assert r.status_code == 200 assert r.status_code == 200
data = r.json() data = r.json()
@@ -31,7 +32,8 @@ def fetch_zones_json(statsip, statsport):
def fetch_traffic_json(statsip, statsport): def fetch_traffic_json(statsip, statsport):
r = requests.get("http://{}:{}/json/v1/traffic".format(statsip, statsport)) r = requests.get("http://{}:{}/json/v1/traffic".format(statsip, statsport),
timeout=600)
assert r.status_code == 200 assert r.status_code == 200
data = r.json() data = r.json()

View File

@@ -23,7 +23,8 @@ from helper import fmt
# XML helper functions # XML helper functions
def fetch_zones_xml(statsip, statsport): def fetch_zones_xml(statsip, statsport):
r = requests.get("http://{}:{}/xml/v3/zones".format(statsip, statsport)) r = requests.get("http://{}:{}/xml/v3/zones".format(statsip, statsport),
timeout=600)
assert r.status_code == 200 assert r.status_code == 200
root = ET.fromstring(r.text) root = ET.fromstring(r.text)
@@ -47,7 +48,8 @@ def fetch_traffic_xml(statsip, statsport):
return out return out
r = requests.get("http://{}:{}/xml/v3/traffic".format(statsip, statsport)) r = requests.get("http://{}:{}/xml/v3/traffic".format(statsip, statsport),
timeout=600)
assert r.status_code == 200 assert r.status_code == 200
root = ET.fromstring(r.text) root = ET.fromstring(r.text)