Skip to content

Commit

Permalink
Added the fixes for Windows detected during internal testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhc123 authored and mye956 committed Aug 29, 2024
1 parent 0c150e4 commit e5ab245
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion agent/stats/engine_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ import (
"github.com/aws/amazon-ecs-agent/agent/config"
mock_dockerapi "github.com/aws/amazon-ecs-agent/agent/dockerclient/dockerapi/mocks"
mock_resolver "github.com/aws/amazon-ecs-agent/agent/stats/resolver/mock"
apicontainerstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/container/status"
apitaskstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/task/status"
ni "github.com/aws/amazon-ecs-agent/ecs-agent/netlib/model/networkinterface"
"github.com/aws/amazon-ecs-agent/ecs-agent/tcs/model/ecstcs"
"github.com/aws/aws-sdk-go/aws"
"github.com/docker/docker/api/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -172,7 +175,11 @@ func TestServiceConnectWithDisabledMetrics(t *testing.T) {
assert.Len(t, engine.taskToServiceConnectStats, 1)
}

func TestStartMetricsPublish(t *testing.T) {
// This test has been moved to be run Linux only. For Windows, the publish metrics timeout has been set to be 5 seconds
// for the reason that Windows takes a bit more time to fetch the volume metrics. This test results in a race condition
// for Windows. Specifically, the discard message condition cannot be replicated in Windows because of the higher
// timeout.
func TestStartMetricsPublishForChannelFull(t *testing.T) {
testcases := []struct {
name string
hasPublishTicker bool
Expand Down

0 comments on commit e5ab245

Please sign in to comment.