Skip to content

Commit

Permalink
OpTestUtil: bmc web logout timeout
Browse files Browse the repository at this point in the history
Set a short timeout for the logout on the bmc web server
in case things are hanging.

Signed-off-by: Deb McLemore <[email protected]>
  • Loading branch information
debmc committed Jul 27, 2019
1 parent 316b793 commit f51bfe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/OpTestUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={} "
Expand Down

0 comments on commit f51bfe0

Please sign in to comment.