Fix webSocket error

that was introduced by closing the WebSocket connection without stopping the inputLoop.
This commit is contained in:
Maximilian Paß
2021-12-15 10:16:09 +01:00
parent feefe2c1ed
commit f3929cbf50
5 changed files with 88 additions and 20 deletions

View File

@@ -44,7 +44,7 @@ func mockRunnerQueries(apiMock *nomad.ExecutorAPIMock, returnedRunnerIds []strin
apiMock.ExpectedCalls = []*mock.Call{}
call := apiMock.On("WatchEventStream", mock.Anything, mock.Anything, mock.Anything)
call.Run(func(args mock.Arguments) {
<-time.After(10 * time.Minute) // 10 minutes is the default test timeout
<-time.After(tests.DefaultTestTimeout)
call.ReturnArguments = mock.Arguments{nil}
})
apiMock.On("LoadEnvironmentJobs").Return([]*nomadApi.Job{}, nil)