Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connector/failoverconnector] Failing unit test: TestTracesWithFailoverRecovery #31005

Closed
crobert-1 opened this issue Feb 1, 2024 · 9 comments · Fixed by #31196
Closed

[connector/failoverconnector] Failing unit test: TestTracesWithFailoverRecovery #31005

crobert-1 opened this issue Feb 1, 2024 · 9 comments · Fixed by #31196
Labels
ci-cd CI, CD, testing, build issues connector/failover flaky test a test is flaky

Comments

@crobert-1
Copy link
Member

Component(s)

connector/failover

Describe the issue you're reporting

CI/CD failing on unrelated PR

Failure output:

--- FAIL: TestTracesWithFailoverRecovery (0.10s)
    traces_test.go:190: 
        	Error Trace:	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/connector/failoverconnector/traces_test.go:190
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestTracesWithFailoverRecovery
FAIL
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector	0.325s
FAIL
@crobert-1 crobert-1 added needs triage New item requiring triage flaky test a test is flaky ci-cd CI, CD, testing, build issues labels Feb 1, 2024
Copy link
Contributor

github-actions bot commented Feb 1, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member Author

Possible duplicate, but different test failing:

--- FAIL: TestLogsWithFailoverRecovery (0.10s)
    logs_test.go:186: 
        	Error Trace:	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/connector/failoverconnector/logs_test.go:186
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestLogsWithFailoverRecovery
FAIL
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector	0.327s
FAIL

It might be worth opening a separate issue for this, but since they look so similar we'll keep together for now.

@akats7
Copy link
Contributor

akats7 commented Feb 1, 2024

Yep thats a duplicate, let me remove those tests temporarily while I mock out the time dependency, looks like its failing on certain runs

@codeboten
Copy link
Contributor

This appears fixed by #31006

@crobert-1
Copy link
Member Author

That fixed the traces failure, but the logs failure still needs addressed:

func TestLogsWithFailoverRecovery(t *testing.T) {

It looks like the same solution can be used there.

@akats7
Copy link
Contributor

akats7 commented Feb 1, 2024

That fixed the traces failure, but the logs failure still needs addressed:

func TestLogsWithFailoverRecovery(t *testing.T) {

It looks like the same solution can be used there.

Opening a PR

@codeboten
Copy link
Contributor

Thanks @akats7

@songy23
Copy link
Member

songy23 commented Feb 2, 2024

Fixed in #31007

@songy23 songy23 closed this as completed Feb 2, 2024
@crobert-1
Copy link
Member Author

Fixed in #31007

The referenced PR only skips the tests, we probably want to leave this issue open until there's an opportunity to fully resolve the issue, or fix the test. Let me know if I missed something, or if that's not the right process. 👍

@crobert-1 crobert-1 reopened this Feb 3, 2024
djaglowski pushed a commit that referenced this issue Feb 21, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Fixes flaky failover recovery unit test bug and expands on failover
recovery test cases to test for more complicated failover scenarios.

**Link to tracking Issue:** Resolves #31005 

**Testing:** <Describe what testing was performed and which tests were
added.>

Additional tests created for traces, metrics, logs. Tests added for
pipeline_selector component

@djaglowski Is there anything specific we want to do before including
the component in the distro and/or putting it in alpha?

**Documentation:** <Describe the documentation added.>
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this issue Mar 13, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Fixes flaky failover recovery unit test bug and expands on failover
recovery test cases to test for more complicated failover scenarios.

**Link to tracking Issue:** Resolves open-telemetry#31005 

**Testing:** <Describe what testing was performed and which tests were
added.>

Additional tests created for traces, metrics, logs. Tests added for
pipeline_selector component

@djaglowski Is there anything specific we want to do before including
the component in the distro and/or putting it in alpha?

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd CI, CD, testing, build issues connector/failover flaky test a test is flaky
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants