Skip to content

Commit

Permalink
* FIX [workflow] fix GET too frequently makes the server to close con…
Browse files Browse the repository at this point in the history
…nection without response

Signed-off-by: wayne <yukang.wei@emqx.io>
  • Loading branch information
OdyWayne committed Apr 27, 2024
1 parent 8866daf commit 929b383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/rest_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_get_api():

for p in paths:
print("testing Get API: " + base_url + p)
response = requests.get(base_url + p, auth=('admin', 'public'))
response = requests.get(base_url + p, auth=('admin', 'public'), headers={'Connection':'close'})

if response.status_code != 200:
print("test get api failed: " + p)
Expand Down Expand Up @@ -48,7 +48,7 @@ def test_post_api():
for item in param_list:
print("testing Post API: " + base_url + item.path)
response = requests.post(
base_url + item.path, json.dumps(item.payload), auth=('admin', 'public'))
base_url + item.path, json.dumps(item.payload), auth=('admin', 'public'), headers={'Connection':'close'})
if response.status_code != 200:
print("test Post api failed: " + item.path)
return False
Expand Down
1 change: 0 additions & 1 deletion .github/scripts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def print_nanomq_log():
raise AssertionError
print("fuzzy test end")

time.sleep(1)
print("rest api test start")
if False == rest_api_test():
nanomq.terminate()
Expand Down

0 comments on commit 929b383

Please sign in to comment.