Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test(coderd/notifications): fix data race in tests and smpttest#15304

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 3 commits intomainfrommafredri/fix-data-race-smtp-notif
Oct 31, 2024

Conversation

mafredri
Copy link
Member

https://github.com/coder/coder/actions/runs/11611105362/job/32331771969#logs

2024-10-31T11:36:45.8625097Z WARNING: DATA RACE2024-10-31T11:36:45.8625194Z Write at 0x00c004c19d38 by goroutine 2661:2024-10-31T11:36:45.8625422Z   github.com/coder/coder/v2/coderd/notifications/dispatch/smtptest.(*Session).Auth()2024-10-31T11:36:45.8625746Z       /home/runner/work/coder/coder/coderd/notifications/dispatch/smtptest/server.go:81 +0x2282024-10-31T11:36:45.8625855Z   github.com/emersion/go-smtp.(*Conn).auth()2024-10-31T11:36:45.8626124Z       /home/runner/go/pkg/mod/github.com/emersion/go-smtp@v0.21.2/conn.go:846 +0x652024-10-31T11:36:45.8626241Z   github.com/emersion/go-smtp.(*Conn).handleAuth()2024-10-31T11:36:45.8626496Z       /home/runner/go/pkg/mod/github.com/emersion/go-smtp@v0.21.2/conn.go:784 +0x1d72024-10-31T11:36:45.8626614Z   github.com/emersion/go-smtp.(*Conn).handle()2024-10-31T11:36:45.8626856Z       /home/runner/go/pkg/mod/github.com/emersion/go-smtp@v0.21.2/conn.go:144 +0x1b02024-10-31T11:36:45.8627040Z   github.com/emersion/go-smtp.(*Server).handleConn()2024-10-31T11:36:45.8627304Z       /home/runner/go/pkg/mod/github.com/emersion/go-smtp@v0.21.2/server.go:165 +0x4102024-10-31T11:36:45.8627438Z   github.com/emersion/go-smtp.(*Server).Serve.func1()2024-10-31T11:36:45.8627692Z       /home/runner/go/pkg/mod/github.com/emersion/go-smtp@v0.21.2/server.go:121 +0x1b82024-10-31T11:36:45.8627697Z 2024-10-31T11:36:45.8627809Z Previous read at 0x00c004c19d38 by goroutine 2655:2024-10-31T11:36:45.8628056Z   github.com/coder/coder/v2/coderd/notifications/dispatch/smtptest.(*Backend).LastMessage()2024-10-31T11:36:45.8628364Z       /home/runner/work/coder/coder/coderd/notifications/dispatch/smtptest/server.go:57 +0x442024-10-31T11:36:45.8628641Z   github.com/coder/coder/v2/coderd/notifications_test.TestNotificationTemplates_Golden.func1.1.5()2024-10-31T11:36:45.8628930Z       /home/runner/work/coder/coder/coderd/notifications/notifications_test.go:1170 +0x532024-10-31T11:36:45.8629073Z   github.com/stretchr/testify/assert.Eventually.func1()2024-10-31T11:36:45.8629371Z       /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/assert/assertions.go:1902 +0x332024-10-31T11:36:45.8629436Z 2024-10-31T11:36:45.8629523Z Goroutine 2661 (running) created at:2024-10-31T11:36:45.8629633Z   github.com/emersion/go-smtp.(*Server).Serve()2024-10-31T11:36:45.8629903Z       /home/runner/go/pkg/mod/github.com/emersion/go-smtp@v0.21.2/server.go:118 +0x2c42024-10-31T11:36:45.8630168Z   github.com/coder/coder/v2/coderd/notifications_test.TestNotificationTemplates_Golden.func1.1.3()2024-10-31T11:36:45.8630453Z       /home/runner/work/coder/coder/coderd/notifications/notifications_test.go:1094 +0xcd2024-10-31T11:36:45.8630457Z 2024-10-31T11:36:45.8630544Z Goroutine 2655 (finished) created at:2024-10-31T11:36:45.8630664Z   github.com/stretchr/testify/assert.Eventually()2024-10-31T11:36:45.8630971Z       /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/assert/assertions.go:1902 +0x3d52024-10-31T11:36:45.8631087Z   github.com/stretchr/testify/require.Eventually()2024-10-31T11:36:45.8631377Z       /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/require/require.go:398 +0xd12024-10-31T11:36:45.8631636Z   github.com/coder/coder/v2/coderd/notifications_test.TestNotificationTemplates_Golden.func1.1()2024-10-31T11:36:45.8631965Z       /home/runner/work/coder/coder/coderd/notifications/notifications_test.go:1169 +0x19be2024-10-31T11:36:45.8632038Z   testing.tRunner()2024-10-31T11:36:45.8632270Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e2024-10-31T11:36:45.8632360Z   testing.(*T).Run.gowrap1()2024-10-31T11:36:45.8632664Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44
2024-10-31T11:36:45.8736202Z WARNING: DATA RACE2024-10-31T11:36:45.8736290Z Write at 0x00c00488e1cf by goroutine 3874:2024-10-31T11:36:45.8736575Z   github.com/coder/coder/v2/coderd/notifications_test.TestNotificationTemplates_Golden.func1.2.2()2024-10-31T11:36:45.8736881Z       /home/runner/work/coder/coder/coderd/notifications/notifications_test.go:1232 +0x14f2024-10-31T11:36:45.8736978Z   net/http.HandlerFunc.ServeHTTP()2024-10-31T11:36:45.8737217Z       /opt/hostedtoolcache/go/1.22.8/x64/src/net/http/server.go:2171 +0x472024-10-31T11:36:45.8737312Z   net/http.serverHandler.ServeHTTP()2024-10-31T11:36:45.8737546Z       /opt/hostedtoolcache/go/1.22.8/x64/src/net/http/server.go:3142 +0x2a12024-10-31T11:36:45.8737630Z   net/http.(*conn).serve()2024-10-31T11:36:45.8737862Z       /opt/hostedtoolcache/go/1.22.8/x64/src/net/http/server.go:2044 +0x13c42024-10-31T11:36:45.8737950Z   net/http.(*Server).Serve.gowrap3()2024-10-31T11:36:45.8738167Z       /opt/hostedtoolcache/go/1.22.8/x64/src/net/http/server.go:3290 +0x4f2024-10-31T11:36:45.8738172Z 2024-10-31T11:36:45.8738288Z Previous read at 0x00c00488e1cf by goroutine 3867:2024-10-31T11:36:45.8738562Z   github.com/coder/coder/v2/coderd/notifications_test.TestNotificationTemplates_Golden.func1.2.3()2024-10-31T11:36:45.8738859Z       /home/runner/work/coder/coder/coderd/notifications/notifications_test.go:1277 +0x2e2024-10-31T11:36:45.8738994Z   github.com/stretchr/testify/assert.Eventually.func1()2024-10-31T11:36:45.8739304Z       /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/assert/assertions.go:1902 +0x332024-10-31T11:36:45.8739377Z 2024-10-31T11:36:45.8739457Z Goroutine 3874 (running) created at:2024-10-31T11:36:45.8739548Z   net/http.(*Server).Serve()2024-10-31T11:36:45.8739777Z       /opt/hostedtoolcache/go/1.22.8/x64/src/net/http/server.go:3290 +0x8ec2024-10-31T11:36:45.8739886Z   net/http/httptest.(*Server).goServe.func1()2024-10-31T11:36:45.8740141Z       /opt/hostedtoolcache/go/1.22.8/x64/src/net/http/httptest/server.go:310 +0xbb2024-10-31T11:36:45.8740145Z 2024-10-31T11:36:45.8740222Z Goroutine 3867 (finished) created at:2024-10-31T11:36:45.8740345Z   github.com/stretchr/testify/assert.Eventually()2024-10-31T11:36:45.8740649Z       /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/assert/assertions.go:1902 +0x3d52024-10-31T11:36:45.8740772Z   github.com/stretchr/testify/require.Eventually()2024-10-31T11:36:45.8741055Z       /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/require/require.go:398 +0xd12024-10-31T11:36:45.8741317Z   github.com/coder/coder/v2/coderd/notifications_test.TestNotificationTemplates_Golden.func1.2()2024-10-31T11:36:45.8741622Z       /home/runner/work/coder/coder/coderd/notifications/notifications_test.go:1276 +0x12fa2024-10-31T11:36:45.8741760Z   testing.tRunner()2024-10-31T11:36:45.8741993Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e2024-10-31T11:36:45.8742077Z   testing.(*T).Run.gowrap1()2024-10-31T11:36:45.8742305Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44

@mafredrimafredri self-assigned thisOct 31, 2024
Copy link
Contributor

@dannykoppingdannykopping left a comment

Choose a reason for hiding this comment

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

Thanks@mafredri!

@mafredrimafredri changed the titletest(coderd/notifications): fix data races in tests and smpttest servertest(coderd/notifications): fix data race in tests and smpttestOct 31, 2024
@mafredrimafredri merged commit6e54bd9 intomainOct 31, 2024
26 checks passed
@mafredrimafredri deleted the mafredri/fix-data-race-smtp-notif branchOctober 31, 2024 13:48
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 31, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@dannykoppingdannykoppingdannykopping approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mafredri@dannykopping

[8]ページ先頭

©2009-2025 Movatter.jp