Comment 0 for bug 1250113

Revision history for this message
VĂ­ctor R. Ruiz (vrruiz) wrote :

In tests/autopilot/webapps_click_packages_autopilot/tests/__init__.py this method is defined:

    def update_autopilot_proxy_for_pid(self, pid):
        self.app_proxy = None
        for x in range(10):
            self.app_proxy = get_proxy_object_for_existing_process(pid=int(pid))
            if not self.app_proxy is None:
                break
            sleep(1000)
            self.assertThat(x, NotEquals(9))
        self.assertThat(self.app_proxy, NotEquals(None))

Line 54 sleep(1000) is using JavaScript units (miliseconds), instead of Python units (seconds). Maybe this function could be rewritten using Eventually.