tests/run-tests.py
changeset 27602 67aa88e00fc7
parent 27567 54bc0e884385
child 27634 a1eff44c432b
--- a/tests/run-tests.py	Thu Dec 31 13:19:20 2015 -0500
+++ b/tests/run-tests.py	Tue Dec 29 04:30:38 2015 +0000
@@ -2015,11 +2015,11 @@
     def _getport(self, count):
         port = self._ports.get(count) # do we have a cached entry?
         if port is None:
-            port = self.options.port + self._portoffset
             portneeded = 3
             # above 100 tries we just give up and let test reports failure
             for tries in xrange(100):
                 allfree = True
+                port = self.options.port + self._portoffset
                 for idx in xrange(portneeded):
                     if not checkportisavailable(port + idx):
                         allfree = False