Skip to content

Commit

Permalink
[PROCS-4575] Split the ECS-EC2 process check running into the core ag…
Browse files Browse the repository at this point in the history
…ent into a separate suite (#31500)
  • Loading branch information
wiyu authored Nov 26, 2024
1 parent 4ee1010 commit 1c86f19
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions test/new-e2e/tests/process/ecs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,24 @@ func (s *ECSEC2Suite) TestProcessCheck() {
assertContainersCollected(t, payloads, []string{"stress-ng"})
}

func (s *ECSEC2Suite) TestProcessCheckInCoreAgent() {
t := s.T()
// ECSEC2CoreAgentSuite runs the same test as ECSEC2Suite but with the process check running in the core agent
// This is duplicated as the tests have been flaky. This may be due to how pulumi is handling the provisioning of
// ecs tasks.
type ECSEC2CoreAgentSuite struct {
ECSEC2Suite
}

func TestECSEC2CoreAgentSuite(t *testing.T) {
t.Parallel()
s := ECSEC2CoreAgentSuite{}
e2eParams := []e2e.SuiteOption{e2e.WithProvisioner(
e2e.NewTypedPulumiProvisioner("ecsEC2CoreAgentCPUStress", ecsEC2CPUStressProvisioner(true), nil))}

s.UpdateEnv(e2e.NewTypedPulumiProvisioner("ecsEC2CPUStress", ecsEC2CPUStressProvisioner(true), nil))
e2e.Run(t, &s, e2eParams...)
}

// Flush fake intake to remove any payloads which may have
s.Env().FakeIntake.Client().FlushServerAndResetAggregators()
func (s *ECSEC2CoreAgentSuite) TestProcessCheckInCoreAgent() {
t := s.T()

var payloads []*aggregator.ProcessPayload
assert.EventuallyWithT(t, func(c *assert.CollectT) {
Expand Down

0 comments on commit 1c86f19

Please sign in to comment.