Ejemplo n.º 1
0
    def testRetry(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Retry.return_value = job_pb2.FrameRetryResponse()
        getStubMock.return_value = stubMock

        frame = opencue.wrappers.frame.Frame(
            job_pb2.Frame(name=TEST_FRAME_NAME, state=job_pb2.RUNNING))
        frame.retry()

        stubMock.Retry.assert_called_with(
            job_pb2.FrameRetryRequest(frame=frame.data), timeout=mock.ANY)
Ejemplo n.º 2
0
 def retry(self):
     """Retries the frame."""
     if self.data.state != job_pb2.FrameState.Value('WAITING'):
         self.stub.Retry(job_pb2.FrameRetryRequest(frame=self.data),
                         timeout=Cuebot.Timeout)