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, 1, len(taskEngine.(*DockerTaskEngine).managedTasks), "exactly one task should be running")
1447
-
1448
-
// stopTask - stop running task, this task will go to STOPPING due to trap handler defined and STOPPED after 6s
1449
-
taskEngine.AddTask(stopTask)
1450
-
}()
1451
-
1452
-
finished:=make(chaninterface{})
1453
-
1454
-
// goroutine to verify task running order and verify assertions
1455
-
gofunc() {
1456
-
// Task goes to RUNNING
1457
-
verifyContainerRunningStateChange(t, taskEngine)
1458
-
verifyTaskIsRunning(stateChangeEvents, testTask)
1459
-
1460
-
time.Sleep(2500*time.Millisecond)
1461
-
1462
-
// At this time, stopTask is received, and SIGTERM sent to task
1463
-
// but the task is still RUNNING due to trap handler
1464
-
assert.Equal(t, apitaskstatus.TaskRunning, testTask.GetKnownStatus(), "task known status should be RUNNING")
1465
-
assert.Equal(t, apitaskstatus.TaskStopped, testTask.GetDesiredStatus(), "task desired status should be STOPPED")
1466
-
// Verify resources are properly consumed in host resource manager, and not consumed for Fargate
1467
-
iftc.LaunchType=="FARGATE" {
1468
-
assert.False(t, taskEngine.(*DockerTaskEngine).hostResourceManager.checkTaskConsumed(testTask.Arn), "fargate task resources should not be consumed")
1469
-
} else {
1470
-
assert.True(t, taskEngine.(*DockerTaskEngine).hostResourceManager.checkTaskConsumed(testTask.Arn), "non fargate task resources should not be consumed")
0 commit comments