• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 18538749878
59%

Build:
DEFAULT BRANCH: main
Ran 15 Oct 2025 06:31PM UTC
Jobs 1
Files 285
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Oct 2025 06:26PM UTC coverage: 46.786% (+0.2%) from 46.588%
18538749878

push

github

web-flow
Fixes race conditions in stdio transport tests (#2222)

1. Mock structs (mockReadCloser and mockWriteCloser): Added sync.Mutex fields to protect concurrent access to shared state fields like readCount, readIndex, and closed.
  2. Test functions with shared variables: Added mutex protection for variables accessed in DoAndReturn callbacks that could be called by multiple goroutines:
    - attachCalled in TestStdinRaceCondition
    - callCount in TestProcessStdout_EOFWithDockerUnavailable and TestProcessStdout_EOFCheckErrorTypes
    - retryCount in TestProcessStdout_EOFWithFailedReattachment
    - attemptCount in TestProcessStdout_EOFWithReattachmentRetryLogic

  All these shared variables were being accessed without synchronization in callbacks that could be executed concurrently by multiple goroutines during the tests, causing race conditions detected by Go's race detector.

  The tests are now passing cleanly with the -race flag enabled! The transport tests in pkg/transport/stdio_test.go are now thread-safe and properly synchronized.

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>

17744 of 37926 relevant lines covered (46.79%)

15.87 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
92.86
-1.43% pkg/secrets/keyring/composite.go
3
72.39
-1.12% pkg/ignore/processor.go
11
48.39
0.0% pkg/transport/types/transport.go
16
33.77
0.11% pkg/transport/proxy/transparent/transparent_proxy.go
21
48.94
-15.96% pkg/secrets/keyring/keyctl_linux.go
24
0.0
0.0% pkg/transport/http.go
35
8.55
-0.3% cmd/thv/app/proxy.go
74
0.0
0.0% pkg/runner/runner.go
106
43.85
31.85% pkg/transport/stdio.go
Jobs
ID Job ID Ran Files Coverage
1 18538749878.1 15 Oct 2025 06:31PM UTC 285
46.79
GitHub Action Run
Source Files on build 18538749878
  • Tree
  • List 285
  • Changed 18
  • Source Changed 15
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18538749878
  • 6a1ba2b1 on github
  • Prev Build on main (#18536610573)
  • Next Build on main (#18550911020)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc