elastic / elastic/fleet-server

[Flaky Test] TestStandAloneRunningSuite/TestOpAMP `signal: killed`

Open
#6,590 3 comments 0 reactions 0 assignees View on GitHub
flaky-test Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
113
Forks
117
Avg merge
1d 16h
Merged PRs (30d)
112

Description

## Flaky Test

* **Test Name:** TestStandAloneRunningSuite/TestOpAMP
* **Link:** https://github.com/elastic/fleet-server/blob/main/testing/e2e/stand_alone_test.go#L640
* **Branch:** `main`
* **Notes:**

### Claude Code analysis ###

The single failing test is TestStandAloneRunningSuite/TestOpAMP. It fails with signal: killed at stand_alone_test.go:659, which is the `Require().NoError(err)` after the `make otelcontribcol` call.

The cause is straightforward: the test runs under a 3-minute context timeout (`context.WithTimeout(..., 3*time.Minute`) at line 603), but it tries to do all of this within that window:

1. Clone the entire `opentelemetry-collector-contrib `repo (shallow, but still large)
2. Run `make otelcontribcol` — a full Go compilation of a massive multi-module project
3. Enroll an agent, start the OTel collector, and verify enrollment

Compiling OTel contrib from scratch on a resource-constrained CI agent can easily take 5–15 minutes. When the 3-minute deadline expires, Go's `exec.CommandContext` sends SIGKILL to the build process, and the temp directory gets cleaned up mid-compile, causing the cascading "no such file or directory" errors seen in the log.

### Stack Trace

```
Error Trace: /opt/buildkite-agent/builds/bk-agent-prod-gcp-1773340912775914247/elastic/fleet-server/testing/e2e/stand_alone_test.go:659

/opt/buildkite-agent/.gvm/versions/go1.25.8.linux.amd64/src/runtime/asm_amd64.s:1693

Error: Received unexpected error:

signal: killed

Test: TestStandAloneRunningSuite/TestOpAMP
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.