Skip to content

[Flaky Test]: internal/pkg/composable TestController – should have 3 item(s), but has 1 #9902

@pchila

Description

@pchila

Failing test case

TestController

Error message

There is a failing assert on length of setVars2 slice

Build

https://buildkite.com/elastic/elastic-agent/builds/26672#01993b53-f32b-4c68-8afb-53192ceb0724/801-1123

OS

Linux, Windows

Stacktrace and notes

=== FAIL: internal/pkg/composable TestController (0.23s)
    controller_test.go:116:
        	Error Trace:	C:/buildkite-agent/builds/bk-agent-prod-gcp-1757636994938619447/elastic/elastic-agent/internal/pkg/composable/controller_test.go:116
        	Error:      	"[0xc000188cc0]" should have 3 item(s), but has 1
        	Test:       	TestController
panic: runtime error: index out of range [1] with length 1 [recovered]
	panic: runtime error: index out of range [1] with length 1
goroutine 18 [running]:
testing.tRunner.func1.2({0x140f4f380, 0xc00032e018})
	C:/Users/Buildkite/.go/go-1.24.7/src/testing/testing.go:1734 +0x3d7
testing.tRunner.func1()
	C:/Users/Buildkite/.go/go-1.24.7/src/testing/testing.go:1737 +0x696
panic({0x140f4f380?, 0xc00032e018?})
	C:/Users/Buildkite/.go/go-1.24.7/src/runtime/panic.go:792 +0x132
github.com/elastic/elastic-agent/internal/pkg/composable_test.TestController(0xc000186540)
	C:/buildkite-agent/builds/bk-agent-prod-gcp-1757636994938619447/elastic/elastic-agent/internal/pkg/composable/controller_test.go:132 +0x1c71
testing.tRunner(0xc000186540, 0x140ffb558)
	C:/Users/Buildkite/.go/go-1.24.7/src/testing/testing.go:1792 +0x1dd
created by testing.(*T).Run in goroutine 1
	C:/Users/Buildkite/.go/go-1.24.7/src/testing/testing.go:1851 +0x8f9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:Elastic-AgentLabel for the Agent teamflaky-testUnstable or unreliable test cases.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions