Fix flaky test TestDestroysRunnerAfterTimeoutAndSignal.
This commit is contained in:

committed by
Sebastian Serth

parent
d0dd5c08cb
commit
160a097d07
@ -263,7 +263,9 @@ func (s *ExecuteInteractivelyTestSuite) TestDestroysRunnerAfterTimeoutAndSignal(
|
|||||||
defaultExecutionID, bytes.NewBuffer(make([]byte, 1)), nil, nil, context.Background())
|
defaultExecutionID, bytes.NewBuffer(make([]byte, 1)), nil, nil, context.Background())
|
||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
|
|
||||||
<-time.After(executionTimeoutGracePeriod + time.Duration(timeLimit)*time.Second + tests.ShortTimeout)
|
<-time.After(executionTimeoutGracePeriod + time.Duration(timeLimit)*time.Second)
|
||||||
|
// Even if we expect the timeout to be exceeded now, Poseidon sometimes take a couple of hundred ms longer.
|
||||||
|
<-time.After(2 * tests.ShortTimeout)
|
||||||
s.manager.AssertNotCalled(s.T(), "Return", s.runner)
|
s.manager.AssertNotCalled(s.T(), "Return", s.runner)
|
||||||
s.apiMock.AssertCalled(s.T(), "DeleteJob", s.runner.ID())
|
s.apiMock.AssertCalled(s.T(), "DeleteJob", s.runner.ID())
|
||||||
s.True(runnerDestroyed)
|
s.True(runnerDestroyed)
|
||||||
|
Reference in New Issue
Block a user