You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.Equal(t, 499, createResponseRecorder.Code, "Response status code should be 499 Client Closed Request")
132
+
assert.Equal(t, "Error when executing the task: client closed request", createResponseRecorder.Body.String(), "Response body should contain error message")
133
+
assert.Empty(t, api.Worker.Tasks, "Tasks map should be empty")
134
+
}()
135
+
136
+
time.Sleep(1*time.Second)
137
+
138
+
assert.Equal(t, 1, len(api.Worker.Tasks), "Tasks map should contain 1 task")
139
+
140
+
// 2 - Cancel a request
141
+
stdout:=helper.CaptureStdout(func() {
142
+
cancel()
143
+
time.Sleep(2*time.Second)
144
+
})
145
+
146
+
assert.NotEmpty(t, stdout, "Task logs shouldn't be empty")
0 commit comments