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

Fix go vet failure on TestDNSProcessorRunInParallel #25468

Merged
merged 2 commits into from
May 1, 2021

Conversation

aleksmaus
Copy link
Contributor

What does this PR do?

Fixes the failure on make check

# github.com/elastic/beats/v7/libbeat/processors/dns
processors/dns/dns_test.go:156:6: call to (*T).Fatal from a non-test goroutine
Error: failed running go vet, please fix the issues reported: running "go vet ./..." failed with exit code 2
make[1]: *** [check] Error 1

Why is it important?

No error after the change.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas

@aleksmaus aleksmaus requested a review from andrewkroh April 30, 2021 16:29
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 30, 2021
@@ -141,6 +141,7 @@ func TestDNSProcessorRunInParallel(t *testing.T) {

// Start several goroutines.
wg.Add(numGoroutines)
errs := make(chan error, numGoroutines*numEvents)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One might want to use errgroup, or Taskgroup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 30, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #25468 updated

  • Start Time: 2021-04-30T16:58:13.236+0000

  • Duration: 130 min 12 sec

  • Commit: dbc1cb4

Test stats 🧪

Test Results
Failed 0
Passed 47159
Skipped 5246
Total 52405

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 47159
Skipped 5246
Total 52405

@aleksmaus aleksmaus added the Team:Elastic-Agent Label for the Agent team label Apr 30, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 30, 2021
@aleksmaus aleksmaus added the backport-v7.14.0 Automated backport with mergify label May 1, 2021
@aleksmaus aleksmaus merged commit e38e0df into elastic:master May 1, 2021
mergify bot pushed a commit that referenced this pull request May 1, 2021
* Fix go vet failure on TestDNSProcessorRunInParallel

* Change to errgroup

(cherry picked from commit e38e0df)
aleksmaus added a commit that referenced this pull request May 3, 2021
* Fix go vet failure on TestDNSProcessorRunInParallel

* Change to errgroup

(cherry picked from commit e38e0df)

Co-authored-by: Aleksandr Maus <aleksandr.maus@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.14.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants