Example #1
0
 def execute(self, runnable):
     runner = Runner(runnable)
     thread = Thread(runner, name='RobotFrameworkTimeoutThread')
     thread.setDaemon(True)
     thread.start()
     thread.join(int(self._timeout * 1000))
     if thread.isAlive():
         thread.stop()
         raise TimeoutError(self._error)
     return runner.get_result()
Example #2
0
 def execute(self, runnable):
     runner = Runner(runnable)
     thread = Thread(runner, name='RobotFrameworkTimeoutThread')
     thread.setDaemon(True)
     thread.start()
     thread.join(int(self._timeout * 1000))
     if thread.isAlive():
         thread.stop()
         raise TimeoutError(self._error)
     return runner.get_result()