Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip testing memory swappiness for cgroupv2 #3638

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion agent/engine/engine_unix_integ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ import (
"github.com/aws/amazon-ecs-agent/agent/utils"
"github.com/aws/amazon-ecs-agent/agent/utils/ttime"
"github.com/aws/aws-sdk-go/aws"

"github.com/containerd/cgroups"
sdkClient "github.com/docker/docker/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -891,7 +893,10 @@ func TestSwapConfigurationTask(t *testing.T) {
cid := containerMap[testTask.Containers[0].Name].DockerID
state, _ := client.ContainerInspect(ctx, cid)
require.EqualValues(t, 314572800, state.HostConfig.MemorySwap)
require.EqualValues(t, 90, *state.HostConfig.MemorySwappiness)
// skip testing memory swappiness for cgroupv2, since this control has been removed in cgroupv2
if cgroups.Mode() != cgroups.Unified {
require.EqualValues(t, 90, *state.HostConfig.MemorySwappiness)
}

// Kill the existing container now
taskUpdate := createTestTask(testArn)
Expand Down