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

Skipping racy tests #1375

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

3vilhamster
Copy link
Contributor

What changed?
Skipping racy test to improve CI stability.

Why?
These tests are leaking go routines and cause failures of the tests both local and on CI.
This is due to leaking goroutine and a lack of control of workflow.Go spawned gorouotines.
I've created a ticket for a depper investigation, but skipping it for now.

How did you test it?

Potential risks

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.23%. Comparing base (847db44) to head (9e69ebd).
Report is 1 commits behind head on master.

Additional details and impacted files

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 847db44...9e69ebd. Read the comment docs.

@3vilhamster 3vilhamster merged commit 163f1a9 into cadence-workflow:master Oct 31, 2024
13 checks passed
@3vilhamster 3vilhamster deleted the skip-racy-tests branch October 31, 2024 23:42
@Groxx
Copy link
Member

Groxx commented Nov 1, 2024

aaagh:

==================
WARNING: DATA RACE
Read at 0x00c00052e043 by goroutine 141:
  testing.(*common).logDepth()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1017 +0xcd
  testing.(*common).log()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1010 +0xa4
  testing.(*common).Logf()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1061 +0x6a
  testing.(*T).Logf()
      <autogenerated>:1 +0x69
  go.uber.org/zap/zaptest.testingWriter.Write()
  ...

Previous write at 0x00c00052e043 by goroutine 138:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1676 +0x8fa
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:602 +0x5d
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44

that log-race is quite annoying.
I'll make a PR for it, and maybe we can pull my safe-logger-shim over from the server.

Groxx added a commit that referenced this pull request Nov 1, 2024
Fixing the flakiness that led to #1375.

The races in these tests were due to `t.Log` calls occurring after the test finishes,
because the workflow (and test suite and tests and...) does not wait for goroutines to shut down.

It's an annoying enough issue that I tackled it with gusto in cadence-workflow/cadence#6067
and it's probably worth porting over here too.
Though the underlying "shut down and do not wait" behavior is still extremely dangerous and needs to be fixed some day.
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.

3 participants