Skip to content

core/internal/cltest: fix mock server race#21913

Merged
jmank88 merged 1 commit intodevelopfrom
http-mock-race
Apr 8, 2026
Merged

core/internal/cltest: fix mock server race#21913
jmank88 merged 1 commit intodevelopfrom
http-mock-race

Conversation

@jmank88
Copy link
Copy Markdown
Contributor

@jmank88 jmank88 commented Apr 8, 2026

WARNING: DATA RACE
Write at 0x00c001a9e0ef by goroutine 890:
  github.com/smartcontractkit/chainlink/v2/core/internal/cltest.NewHTTPMockServer.func1()
      /home/runner/_work/chainlink/chainlink/core/internal/cltest/mocks.go:179 +0x21b
  net/http.HandlerFunc.ServeHTTP()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:2322 +0x47
  net/http.serverHandler.ServeHTTP()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:3340 +0x2a1
  net/http.(*conn).serve()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:2109 +0xda4
  net/http.(*Server).Serve.gowrap3()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:3493 +0x4f

Previous write at 0x00c001a9e0ef by goroutine 891:
  github.com/smartcontractkit/chainlink/v2/core/internal/cltest.NewHTTPMockServer.func1()
      /home/runner/_work/chainlink/chainlink/core/internal/cltest/mocks.go:179 +0x21b
  net/http.HandlerFunc.ServeHTTP()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:2322 +0x47
  net/http.serverHandler.ServeHTTP()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:3340 +0x2a1
  net/http.(*conn).serve()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:2109 +0xda4
  net/http.(*Server).Serve.gowrap3()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:3493 +0x4f

Goroutine 890 (running) created at:
  net/http.(*Server).Serve()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:3493 +0x889
  net/http/httptest.(*Server).goServe.func1()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/httptest/server.go:311 +0xb2

Goroutine 891 (running) created at:
  net/http.(*Server).Serve()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/server.go:3493 +0x889
  net/http/httptest.(*Server).goServe.func1()
      /opt/hostedtoolcache/go/1.25.7/x64/src/net/http/httptest/server.go:311 +0xb2

https://github.com/smartcontractkit/chainlink/actions/runs/24134916661/job/70420468221

@jmank88 jmank88 requested review from a team as code owners April 8, 2026 12:58
@jmank88 jmank88 requested a review from pavel-raykov April 8, 2026 12:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

👋 jmank88, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ No conflicts with other open PRs targeting develop

@jmank88 jmank88 enabled auto-merge April 8, 2026 13:05
@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 8, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Test_CRE_V2_EVM_FilterLogs_Invalid_ToBlock_Regression/[v2]_EVM.FilterLogs_-_invalid_ToBlock_fails_with_empty_string The test failed because it did not find the expected user log message indicating a failure in processing an invalid ToBlock parameter. Logs ↗︎
Test_CRE_V2_EVM_Write_LogTrigger/[v2]_EVM_Write_-_workflow-gateway-capabilities The test failed because a specific feed did not update within the expected timeout. Logs ↗︎
Test_CRE_V2_Suite_Bucket_A/[v2]_Proof_Of_Reserve_-_workflow-gateway-capabilities The test failed because a specific feed did not update within the expected timeout. Logs ↗︎
Test_CRE_V2_EVM_Write_LogTrigger The test 'Test_CRE_V2_EVM_Write_LogTrigger' failed without providing specific error details. Logs ↗︎

... and 4 more

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link
Copy Markdown

@jmank88 jmank88 requested a review from se3000 April 8, 2026 14:18
@jmank88 jmank88 added this pull request to the merge queue Apr 8, 2026
Merged via the queue into develop with commit 2e5181a Apr 8, 2026
249 of 253 checks passed
@jmank88 jmank88 deleted the http-mock-race branch April 8, 2026 14:43
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