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

jeffotoni / quick
51%

Build:
DEFAULT BRANCH: main
Repo Added 07 Mar 2023 04:23AM UTC
Files 160
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

LAST BUILD ON BRANCH main
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • main

06 Oct 2025 05:54PM UTC coverage: 50.747% (-0.5%) from 51.295%
368

push

circleci

BRX0002735_prosegur
fix(middleware/logger): resolve race condition in JSON logger test

Fixed intermittent test failures in TestLoggerMiddlewareJSON caused by
a race condition in the captureOutput helper function.

Changes:
- Modified captureOutput to properly synchronize pipe reading with a
  done channel, ensuring all output is captured before returning
- Changed from channel-based output retrieval to direct buffer access
  with proper synchronization
- Added stderr capture alongside stdout to handle loggers that may
  write to either stream
- Added io.ReadAll(resp.Body) in test cases to ensure response is
  fully consumed before closing the pipe

The race condition occurred because the pipe was being closed and read
before the logger middleware had finished writing its output. This
resulted in empty captures on the first test run (~33% failure rate
with --count=3).

The fix ensures deterministic test behavior by waiting for the reader
goroutine to complete via the done channel before returning the
captured output.

Tests now pass consistently across multiple runs.

4146 of 8170 relevant lines covered (50.75%)

1326.08 hits per line

Relevant lines Covered
Build:
Build:
8170 RELEVANT LINES 4146 COVERED LINES
1326.08 HITS PER LINE
Source Files on main
  • Tree
  • List 160
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
368 main fix(middleware/logger): resolve race condition in JSON logger test Fixed intermittent test failures in TestLoggerMiddlewareJSON caused by a race condition in the captureOutput helper function. Changes: - Modified captureOutput to properly synchr... push 06 Oct 2025 05:55PM UTC BRX0002735_prosegur circleci
50.75
365 main doc: Example pusher quick push 06 Oct 2025 01:37PM UTC BRX0002735_prosegur circleci
51.3
364 main refactor: enhance responseWriter with protocol support and optimize pooling Extended responseWriter wrapper to support WebSockets and HTTP/2 features: - Implemented http.Hijacker interface for WebSocket connection upgrades - Implemented http.Push... push 04 Oct 2025 04:01PM UTC BRX0002735_prosegur circleci
51.49
363 main feat: add responseWriter wrapper to prevent duplicate WriteHeader calls Implemented a custom responseWriter wrapper to handle multiple WriteHeader calls gracefully. The wrapper silently ignores duplicate calls, preventing "superfluous response.Wr... push 04 Oct 2025 03:42PM UTC BRX0002735_prosegur circleci
51.54
362 main feat: type http.Flusher push 04 Oct 2025 05:05AM UTC BRX0002735_prosegur circleci
51.77
361 main feat: we unwrap SSE no quick, now we can use a Server Sent Event. push 04 Oct 2025 03:42AM UTC BRX0002735_prosegur circleci
51.77
360 main docs: upgrade example - use Qtest in Example quick push 09 Sep 2025 06:28PM UTC jeffotoni circleci
52.69
359 main doc: Example glog push 03 Sep 2025 07:39PM UTC BRX0002735_prosegur circleci
52.69
358 main refactor: Improved middleware cors preflight request push 01 Sep 2025 07:50PM UTC jeffotoni circleci
53.08
357 main refactor: Improved middleware logger forms fields in Logger push 29 Aug 2025 11:42PM UTC jeffotoni circleci
53.08
See All Builds (224)
  • Repo on GitHub
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

© 2025 Coveralls, Inc