otel: fix flakiness and enable logs_dynamic_id in TestFBOtelRestartE2E#6819
otel: fix flakiness and enable logs_dynamic_id in TestFBOtelRestartE2E#6819mauri870 merged 17 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
adc2425 to
d8d9cb2
Compare
|
Moving this to draft since it requires work done in beats via elastic/beats#42412 . I need to bump the beats dependency in go.mod #6837. |
dc95b0a to
d04606e
Compare
|
I'm repurposing this PR to include a series of fixes for the otel tests. Having the fixes as a batch as oposed to separate PRs speeds up the continuous integration builds. |
This test starts the collector with a timeout, but the error returned is not always a context cancelled, sometimes it returns err == nil, which is also fine, just not handled properly. While at it, fix some other issues I found while testing: - Using require inside a goroutine calls runtime.GoExit on failure, meaning the test exits immediatelly without doing any cleanup. Use assert in those cases.
d04606e to
95c25c9
Compare
Pull request was converted to draft
|
Leaving this as draft since we had to remove all the tests as a part of a last ditch fix for EDOT in v9.0. I will revisit this once #7023 is reverted. |
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
|
|
💚 Build Succeeded
History
cc @mauri870 |
…tE2E (#6819) * otel: fix flaky behavior on TestFBOtelRestartE2E This test starts the collector with a timeout, but the error returned is not always a context cancelled, sometimes it returns err == nil, which is also fine, just not handled properly. While at it, fix some other issues I found while testing: - Using require inside a goroutine calls runtime.GoExit on failure, meaning the test exits immediatelly without doing any cleanup. Use assert in those cases. * don't fail if ignored field is equal * use a different index name to avoid conflicts * Update testing/integration/otel_test.go Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> * Update testing/integration/otel_test.go Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> * use assert.Conditionf for error check --------- Co-authored-by: Khushi Jain <khushi.jain@elastic.co> Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> (cherry picked from commit 82460a2)
…tE2E (#6819) * otel: fix flaky behavior on TestFBOtelRestartE2E This test starts the collector with a timeout, but the error returned is not always a context cancelled, sometimes it returns err == nil, which is also fine, just not handled properly. While at it, fix some other issues I found while testing: - Using require inside a goroutine calls runtime.GoExit on failure, meaning the test exits immediatelly without doing any cleanup. Use assert in those cases. * don't fail if ignored field is equal * use a different index name to avoid conflicts * Update testing/integration/otel_test.go Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> * Update testing/integration/otel_test.go Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> * use assert.Conditionf for error check --------- Co-authored-by: Khushi Jain <khushi.jain@elastic.co> Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> (cherry picked from commit 82460a2)
…tE2E (#6819) (#8007) * otel: fix flaky behavior on TestFBOtelRestartE2E This test starts the collector with a timeout, but the error returned is not always a context cancelled, sometimes it returns err == nil, which is also fine, just not handled properly. While at it, fix some other issues I found while testing: - Using require inside a goroutine calls runtime.GoExit on failure, meaning the test exits immediatelly without doing any cleanup. Use assert in those cases. * don't fail if ignored field is equal * use a different index name to avoid conflicts * Update testing/integration/otel_test.go * Update testing/integration/otel_test.go * use assert.Conditionf for error check --------- (cherry picked from commit 82460a2) Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Co-authored-by: Khushi Jain <khushi.jain@elastic.co> Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
…tE2E (#6819) (#8006) * otel: fix flaky behavior on TestFBOtelRestartE2E This test starts the collector with a timeout, but the error returned is not always a context cancelled, sometimes it returns err == nil, which is also fine, just not handled properly. While at it, fix some other issues I found while testing: - Using require inside a goroutine calls runtime.GoExit on failure, meaning the test exits immediatelly without doing any cleanup. Use assert in those cases. * don't fail if ignored field is equal * use a different index name to avoid conflicts * Update testing/integration/otel_test.go * Update testing/integration/otel_test.go * use assert.Conditionf for error check --------- (cherry picked from commit 82460a2) Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Co-authored-by: Khushi Jain <khushi.jain@elastic.co> Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>





What does this PR do?
This test starts the collector with a timeout, but the error returned is not
always a context cancelled, sometimes it returns err == nil, which is also
fine, just not handled properly.
While at it, fix some other issues I found while testing:
the test exits immediatelly without doing any cleanup, causing resource leaks. Use assert in those
cases.
Checklist
./changelog/fragmentsusing the changelog toolRelated issues