diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-09-08 18:06:07 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-09-08 18:06:07 -0300 |
commit | 6daa2edea54d10e761d0432137373f226f2613ca (patch) | |
tree | 47d30f4c7447d4b30b417eedd85fff1bd814960c /tests | |
parent | 6fb0e698eeeb4eda86df2f59b833eada0543fdc4 (diff) |
Store randon port after fail on first attempt.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/util/httpd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/util/httpd.py b/tests/util/httpd.py index 4d7dde94b..03b44d654 100644 --- a/tests/util/httpd.py +++ b/tests/util/httpd.py @@ -125,7 +125,8 @@ class TestServer(threading.Thread): try: self.httpd = CompatTCPServer(('' , self._port), handle) except: - self.httpd = CompatTCPServer(('' , self._port + random.randint(1, 100)), handle) + self._port = self._port + random.randint(1, 100) + self.httpd = CompatTCPServer(('' , self._port), handle) def port(self): return self._port |