Skip to content

Commit

Permalink
Try to ensure that WSGI server has stopped before returning from Test…
Browse files Browse the repository at this point in the history
…ScopeWSGIServer testTearDown
  • Loading branch information
datakurre committed May 7, 2022
1 parent a2f7c6b commit 6ee97db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plone/app/robotframework/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ def tearDown(self):

def testTearDown(self):
super(TestScopeWSGIServer, self).tearDown()
# Try to wait until server no longer responds.
if hasattr(self, "server"):
for i in range(10):
# There is implicit 0.3 second sleep per try.
if not self.server.wait(0):
return


TEST_SCOPE_WSGI_SERVER_FIXTURE = TestScopeWSGIServer()
Expand Down

0 comments on commit 6ee97db

Please sign in to comment.