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

[test] Avoid logging to testing.T from server goroutine #4546

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Jun 22, 2023

Which problem is this PR solving?

Short description of the changes

  • Do not use zaptest.NewLogger(t) because it causes race condition shown in the ticket when the server goroutine tries to log something that is being forwarded to testing.T while the test is being shutdown due to panic.
  • I was not able to get to the root cause why this happens, since the test is properly shutting down the server. This may indicate an issue in testing itself in how it handles panic.

@yurishkuro yurishkuro requested a review from a team as a code owner June 22, 2023 16:24
@yurishkuro yurishkuro requested a review from vprithvi June 22, 2023 16:24
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.03 ⚠️

Comparison is base (109b730) 97.07% compared to head (10b6b66) 97.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4546      +/-   ##
==========================================
- Coverage   97.07%   97.04%   -0.03%     
==========================================
  Files         301      301              
  Lines       17817    17817              
==========================================
- Hits        17295    17291       -4     
- Misses        419      422       +3     
- Partials      103      104       +1     
Flag Coverage Δ
unittests 97.04% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yurishkuro yurishkuro merged commit 3ed0928 into jaegertracing:main Jun 22, 2023
@yurishkuro yurishkuro deleted the fix-test branch June 22, 2023 17:04
kjschnei001 pushed a commit to kjschnei001/jaeger that referenced this pull request Jun 29, 2023
…g#4546)

## Which problem is this PR solving?
- Resolves jaegertracing#4497

## Short description of the changes
- Do not use `zaptest.NewLogger(t)` because it causes race condition
shown in the ticket when the server goroutine tries to log something
that is being forwarded to `testing.T` while the test is being shutdown
due to panic.
- I was not able to get to the root cause why this happens, since the
test is properly shutting down the server. This may indicate an issue in
testing itself in how it handles panic.

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: KevinSchneider <[email protected]>
afzal442 pushed a commit to Cloud-Hacks/jaeger that referenced this pull request Jul 10, 2023
…g#4546)

## Which problem is this PR solving?
- Resolves jaegertracing#4497

## Short description of the changes
- Do not use `zaptest.NewLogger(t)` because it causes race condition
shown in the ticket when the server goroutine tries to log something
that is being forwarded to `testing.T` while the test is being shutdown
due to panic.
- I was not able to get to the root cause why this happens, since the
test is properly shutting down the server. This may indicate an issue in
testing itself in how it handles panic.

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Afzal Ansari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Race condition in TestSpanCollectorHTTPS
1 participant