Commit a92ef82b by Jérome Perrin

tests/slapproxy: give more time to slapproxy to start

Tests are sometimes failing with:

```
======================================================================
FAIL: testForwardToMasterInList (slapos.tests.slapproxy.TestMultiMasterSupport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/slapgrid/slappart9/srv/testnode/byq/inst/test0-0/parts/slapos.core/slapos/tests/slapproxy/__init__.py", line 1003, in setUp
    self.startExternalProxy()
  File "/srv/slapgrid/slappart9/srv/testnode/byq/inst/test0-0/parts/slapos.core/slapos/tests/slapproxy/__init__.py", line 1050, in startExternalProxy
    self.fail('Could not start external proxy.')
AssertionError: Could not start external proxy.

```

especially on `COMP-2203-3Nodes-ERP5PROJECT2`. I logged on that machine and check the tests, it was really a problem that this slapproxy needs more than the `(20 * .1) = 2` seconds this tests waits before concluding that slap proxy could not start.

Change the waiting loop to wait more each time. With this approach the max waiting time is 20 seconds.

/reviewed-on !83
1 parent fa6d8a69
......@@ -1044,7 +1044,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db
break
except (slapos.slap.ConnectionError, socket.error):
attempts = attempts + 1
time.sleep(0.1)
time.sleep(0.1 * attempts)
else:
self.fail('Could not start external proxy.')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!