def _waitForTestManagerConnectivity(self, cSecTimeout): """ Check and wait for network connectivity to the test manager. This is used with the windows installation and uninstallation since these usually disrupts network connectivity when installing the filter driver. If we proceed to quickly, we might finish the test at a time when we cannot report to the test manager and thus end up with an abandonded test error. """ cSecElapsed = 0 secStart = utils.timestampSecond() while reporter.checkTestManagerConnection() is False: cSecElapsed = utils.timestampSecond() - secStart if cSecElapsed >= cSecTimeout: reporter.log( '_waitForTestManagerConnectivity: Giving up after %u secs.' % (cSecTimeout, )) return False time.sleep(2) if cSecElapsed > 0: reporter.log('_waitForTestManagerConnectivity: Waited %s secs.' % (cSecTimeout, )) return True
def _waitForTestManagerConnectivity(self, cSecTimeout): """ Check and wait for network connectivity to the test manager. This is used with the windows installation and uninstallation since these usually disrupts network connectivity when installing the filter driver. If we proceed to quickly, we might finish the test at a time when we cannot report to the test manager and thus end up with an abandonded test error. """ cSecElapsed = 0; secStart = utils.timestampSecond(); while reporter.checkTestManagerConnection() is False: cSecElapsed = utils.timestampSecond() - secStart; if cSecElapsed >= cSecTimeout: reporter.log('_waitForTestManagerConnectivity: Giving up after %u secs.' % (cSecTimeout,)); return False; time.sleep(2); if cSecElapsed > 0: reporter.log('_waitForTestManagerConnectivity: Waited %s secs.' % (cSecTimeout,)); return True;