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

@ -261,7 +261,7 @@ func TestNomadEnvironmentManager_List(t *testing.T) {
func mockWatchAllocations(apiMock *nomad.ExecutorAPIMock) {
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}
})
}