From f51bfe01269132a74ba566251cbad298e5ee690f Mon Sep 17 00:00:00 2001 From: Deb McLemore Date: Sun, 21 Apr 2019 19:18:42 -0500 Subject: [PATCH] OpTestUtil: bmc web logout timeout Set a short timeout for the logout on the bmc web server in case things are hanging. Signed-off-by: Deb McLemore --- common/OpTestUtil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/OpTestUtil.py b/common/OpTestUtil.py index ee48f2978..ce33ad3c7 100644 --- a/common/OpTestUtil.py +++ b/common/OpTestUtil.py @@ -1846,7 +1846,8 @@ def logout(self, uri=None): payload = {"data": []} try: # make direct call to requests post, by-pass loop_it - r = self.session.post(self._url(uri), json=payload) + # we only try for a short time (seconds) in case things are hung up + r = self.session.post(self._url(uri), json=payload, timeout=30) if r.status_code != requests.codes.ok: log.debug("Requests post problem with logging " "out, r.status_code={} r.text={} r.headers={} "