Skip to content

🚨 Test: Add flushing-related unit tests for net/http adaptor#3807

Merged
ReneWerner87 merged 6 commits intogofiber:mainfrom
grivera64:tests(adaptor)/add-flushing-tests
Oct 20, 2025
Merged

🚨 Test: Add flushing-related unit tests for net/http adaptor#3807
ReneWerner87 merged 6 commits intogofiber:mainfrom
grivera64:tests(adaptor)/add-flushing-tests

Conversation

@grivera64
Copy link
Member

Description

This PR adds flushing-related unit tests for the net/http adaptor:

  • Test_HTTPHandler_Flush
  • Test_HTTPHandler_Flush_App_Test
  • Test_HTTPHandler_App_Test_Interrupted

Fixes #3421

Changes introduced/Type of change

  • Unit Tests
    • Added unit tests to ensure the new fasthttpadaptor changes in valyala/fasthttp@v1.67.0

Checklist

Before you submit your pull request, please make sure you meet these requirements:

  • Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage.
  • Conducted a self-review of the code and provided comments for complex or critical parts.
  • Updated the documentation in the /docs/ directory for Fiber's documentation.
  • Added or updated unit tests to validate the effectiveness of the changes or new features.
  • Ensured that new and existing unit tests pass locally with the changes.
  • Verified that any new dependencies are essential and have been agreed upon by the maintainers/community.
  • Aimed for optimal performance with minimal allocations in the new code.
  • Provided benchmarks for the new code to analyze and improve upon.

Copilot AI review requested due to automatic review settings October 16, 2025 06:15
@grivera64 grivera64 requested a review from a team as a code owner October 16, 2025 06:15
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @grivera64, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a suite of new unit tests for the net/http adaptor, focusing on the http.Flusher interface's behavior. The tests cover various scenarios, including basic flushing, flushing within the application's test environment, and handling interrupted responses due to timeouts, thereby ensuring the robustness and correctness of recent fasthttpadaptor updates.

Highlights

  • New Unit Tests for Flushing: Added three new unit tests (Test_HTTPHandler_Flush, Test_HTTPHandler_Flush_App_Test, Test_HTTPHandler_App_Test_Interrupted) to validate flushing-related behavior in the net/http adaptor.
  • Fasthttp Adaptor Validation: These new tests specifically ensure the correct functionality of the fasthttpadaptor changes introduced in valyala/fasthttp@v1.67.0 regarding flushing.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds integration tests for the adaptor middleware that validate net/http → adaptor → fasthttp/fiber interactions, including propagation of request fields/headers/body, mid-response Flush() streaming, delayed chunk writes, and timeout-interrupted partial responses.

Changes

Cohort / File(s) Summary
Middleware adaptor tests
middleware/adaptor/adaptor_test.go, adapter_test.go
Adds integration tests and scaffolding exercising the adaptor. Introduces shared expected constants, context key/value setup, and multiple tests: mid-response http.Flusher behavior, app-level streaming with delayed writes and flushes, and a timeout-interrupted streaming scenario asserting partial body and io.ErrUnexpectedEOF. Extends imports for io, net/http/httptest, and time. No public API changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Test
    participant Adaptor as Fiber Adaptor
    participant NetHTTP as net/http Handler
    participant FastHTTP as fasthttp Response

    Test->>Adaptor: invoke adapted handler with RequestCtx
    Adaptor->>NetHTTP: construct ResponseWriter + *http.Request, call handler
    NetHTTP->>NetHTTP: set headers, write body chunk(s)
    NetHTTP->>Adaptor: call Flush (if Flusher present)
    Adaptor->>FastHTTP: stream headers/chunk immediately
    alt repeated flushes
        NetHTTP->>Adaptor: additional Flush calls
        Adaptor->>FastHTTP: stream more chunks
    end
    alt timeout / interruption
        Note right of Adaptor #ffe6a7: test/app timeout triggers
        Adaptor->>NetHTTP: handler interrupted
        NetHTTP-->>Adaptor: returns partial body / reader error
        Adaptor->>FastHTTP: finalize with partial body
    else normal completion
        NetHTTP->>Adaptor: handler completes
        Adaptor->>FastHTTP: finalize response
    end
    Test->>Test: assert status, headers, body chunks, and error conditions
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

☢️ Bug, v3

Suggested reviewers

  • gaby
  • sixcolors
  • efectn
  • ReneWerner87

Poem

🐰
I hopped through tests with nimble feet,
Flushed tiny bytes so streams could meet,
Chunk by chunk the pathways gleam,
Timeout may bite, yet streams still dream,
A rabbit cheers: the adaptor’s sweet!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the addition of flushing-related unit tests for the net/http adaptor and directly reflects the core change introduced by this pull request.
Linked Issues Check ✅ Passed The new tests directly address the primary objective from issue #3421 by verifying that http.Flusher.Flush calls produce intermediate responses, exercising streaming and timeout interruption scenarios as described in the bug report.
Out of Scope Changes Check ✅ Passed All changes are confined to adding unit tests for the net/http adaptor and no unrelated code or files were modified, keeping the pull request focused on its stated objectives.
Description Check ✅ Passed The pull request description clearly outlines the added flushing-related tests, references the linked issue (#3421), lists the specific tests introduced, and marks completed checklist items, aligning well with the repository’s template requirements.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fecb06e and fc9d995.

📒 Files selected for processing (1)
  • adapter_test.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • adapter_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds valuable unit tests for flushing behavior in the net/http adaptor. The tests cover several important scenarios, including a direct handler test, a full application test, and a test for interrupted connections. My review includes suggestions to improve maintainability by reducing code duplication, enhance test suite performance by enabling parallel execution, and maintain a consistent coding style within the tests.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.02%. Comparing base (2c43a0f) to head (fc9d995).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3807      +/-   ##
==========================================
- Coverage   92.07%   92.02%   -0.05%     
==========================================
  Files         115      115              
  Lines       12249    12249              
==========================================
- Hits        11278    11272       -6     
- Misses        707      712       +5     
- Partials      264      265       +1     
Flag Coverage Δ
unittests 92.02% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds unit tests to verify flushing behavior in the net/http adaptor, ensuring http.Flusher support and behavior under interrupted reads.

  • Adds Test_HTTPHandler_Flush to validate request/response mapping and flush behavior.
  • Adds Test_HTTPHandler_Flush_App_Test to verify streaming with flush via app.Test.
  • Adds Test_HTTPHandler_App_Test_Interrupted to verify behavior when the client times out mid-stream.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c43a0f and 0df7ec1.

📒 Files selected for processing (1)
  • middleware/adaptor/adaptor_test.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Format Go code using gofumpt (Make target: make format).
Run golangci-lint for linting (Make target: make lint).
Run go vet as part of audit to catch suspicious constructs (Make target: make audit).
Optimize struct field alignment with betteralign (Make target: make betteralign).
Apply gopls modernize to update code patterns (Make target: make modernize).

Files:

  • middleware/adaptor/adaptor_test.go
**/*_test.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*_test.go: Run the test suite with gotestsum (Make target: make test).
Run benchmarks with go test (Make target: make benchmark).

Files:

  • middleware/adaptor/adaptor_test.go
🧠 Learnings (1)
📚 Learning: 2024-11-10T23:44:13.704Z
Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/adaptor/adaptor.go:111-111
Timestamp: 2024-11-10T23:44:13.704Z
Learning: In the `middleware/adaptor/adaptor.go` file of the Fiber framework, when updating context handling, replacing `c.Context()` with `c.RequestCtx()` is appropriate to access the `fasthttp.RequestCtx`.

Applied to files:

  • middleware/adaptor/adaptor_test.go
🧬 Code graph analysis (1)
middleware/adaptor/adaptor_test.go (3)
constants.go (4)
  • MethodPost (7-7)
  • StatusBadRequest (73-73)
  • StatusOK (52-52)
  • MethodGet (5-5)
middleware/adaptor/adaptor.go (1)
  • HTTPHandlerFunc (33-35)
app.go (1)
  • TestConfig (1084-1095)
🪛 GitHub Actions: golangci-lint
middleware/adaptor/adaptor_test.go

[error] 33-33: golangci-lint: string /foo/bar?baz=123 has 3 occurrences, make it a constant (goconst)

🪛 GitHub Check: lint
middleware/adaptor/adaptor_test.go

[failure] 246-246:
File is not properly formatted (gofmt)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Compare
  • GitHub Check: repeated
  • GitHub Check: unit (1.25.x, windows-latest)
  • GitHub Check: unit (1.25.x, macos-13)

@ReneWerner87
Copy link
Member

ReneWerner87 commented Oct 16, 2025

@grivera64 can you check the ai hints and linting

@grivera64
Copy link
Member Author

grivera64 commented Oct 16, 2025

@grivera64 can you check the ai hints and linting

@ReneWerner87 Done (edit: for the most part, a few hints I missed, but will address asap)! The linter workflow should pass and I've separated the middleware/adaptor vs adapter code unit tests to cover both the middleware adaptor and built-in adapter as per the AI hints.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
middleware/adaptor/adaptor_test.go (2)

209-233: Add t.Parallel; use require.True instead of t.Fatalf for Flusher check; consider shorter sleep

  • Add t.Parallel() at the start.
  • Replace t.Fatalf with require.True for consistency.
  • Optionally reduce time.Sleep(500ms) to speed up tests.

235-263: Same: add t.Parallel; use require.True; consider shorter sleep

  • Add t.Parallel() at the start.
  • Replace t.Fatalf with require.True.
  • Optionally reduce time.Sleep(500ms) while keeping Timeout < sleep.
🧹 Nitpick comments (1)
middleware/adaptor/adaptor_test.go (1)

117-207: Avoid re-declaring expected locals; reuse package-level constants*

This test redefines expectedRequestURI/body/host/remoteAddr already declared at the top. Reuse the hoisted constants to prevent shadowing and keep linters (goconst/shadow) happy.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0df7ec1 and a556c1e.

📒 Files selected for processing (2)
  • adapter_test.go (2 hunks)
  • middleware/adaptor/adaptor_test.go (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Format Go code using gofumpt (Make target: make format).
Run golangci-lint for linting (Make target: make lint).
Run go vet as part of audit to catch suspicious constructs (Make target: make audit).
Optimize struct field alignment with betteralign (Make target: make betteralign).
Apply gopls modernize to update code patterns (Make target: make modernize).

Files:

  • adapter_test.go
  • middleware/adaptor/adaptor_test.go
**/*_test.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*_test.go: Run the test suite with gotestsum (Make target: make test).
Run benchmarks with go test (Make target: make benchmark).

Files:

  • adapter_test.go
  • middleware/adaptor/adaptor_test.go
🧠 Learnings (4)
📚 Learning: 2024-10-08T19:06:06.583Z
Learnt from: sixcolors
PR: gofiber/fiber#2922
File: middleware/cors/utils.go:63-71
Timestamp: 2024-10-08T19:06:06.583Z
Learning: The project uses the testify/assert package for assertions in unit tests.

Applied to files:

  • adapter_test.go
📚 Learning: 2024-10-08T19:06:06.583Z
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/store.go:164-167
Timestamp: 2024-10-08T19:06:06.583Z
Learning: Unit tests in this project use testify require.

Applied to files:

  • adapter_test.go
📚 Learning: 2024-12-13T08:14:22.851Z
Learnt from: efectn
PR: gofiber/fiber#3162
File: hooks_test.go:228-228
Timestamp: 2024-12-13T08:14:22.851Z
Learning: In Go test files, prefer using the `require` methods from the `testify` package for assertions instead of manual comparisons and calls to `t.Fatal` or `t.Fatalf`.

Applied to files:

  • adapter_test.go
  • middleware/adaptor/adaptor_test.go
📚 Learning: 2024-11-10T23:44:13.704Z
Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/adaptor/adaptor.go:111-111
Timestamp: 2024-11-10T23:44:13.704Z
Learning: In the `middleware/adaptor/adaptor.go` file of the Fiber framework, when updating context handling, replacing `c.Context()` with `c.RequestCtx()` is appropriate to access the `fasthttp.RequestCtx`.

Applied to files:

  • middleware/adaptor/adaptor_test.go
🧬 Code graph analysis (2)
adapter_test.go (3)
app.go (3)
  • Handler (40-40)
  • New (515-628)
  • TestConfig (1084-1095)
constants.go (2)
  • StatusOK (52-52)
  • MethodGet (5-5)
middleware/adaptor/adaptor_test.go (1)
  • Test_HTTPHandler_App_Test_Interrupted (235-262)
middleware/adaptor/adaptor_test.go (4)
constants.go (4)
  • MethodPost (7-7)
  • StatusBadRequest (73-73)
  • StatusOK (52-52)
  • MethodGet (5-5)
middleware/adaptor/adaptor.go (1)
  • HTTPHandlerFunc (33-35)
app.go (2)
  • New (515-628)
  • TestConfig (1084-1095)
adapter_test.go (1)
  • Test_HTTPHandler_App_Test_Interrupted (144-171)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: unit (1.25.x, windows-latest)
  • GitHub Check: Compare
  • GitHub Check: unit (1.25.x, macos-latest)
  • GitHub Check: unit (1.25.x, macos-13)
  • GitHub Check: repeated
🔇 Additional comments (3)
adapter_test.go (1)

90-116: Flush test logic looks good

Covers write+flush path; assertions are consistent with the rest of the file.

middleware/adaptor/adaptor_test.go (2)

26-31: Good: shared test constants reduce duplication

Nice centralization; helps with goconst and readability.


168-173: Flush point inserted correctly

Splitting the write and flushing in between matches the intended behavior under test.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
middleware/adaptor/adaptor_test.go (1)

214-224: DRY the streaming handler used in both tests

Extract the repeated net/http handler into a helper to reduce duplication and keep the tests lean.

Example:

// outside tests
func streamingFlusherHandler(t *testing.T) fiber.Handler {
  return HTTPHandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
    flusher, ok := w.(http.Flusher)
    require.True(t, ok, "w does not implement http.Flusher")
    w.WriteHeader(fiber.StatusOK)
    fmt.Fprintf(w, "Hello ")
    flusher.Flush()
    time.Sleep(500 * time.Millisecond)
    fmt.Fprintf(w, "World!")
  })
}

Then:

- app.Get("/", HTTPHandlerFunc(func(w http.ResponseWriter, r *http.Request) { ... }))
+ app.Get("/", streamingFlusherHandler(t))

Also applies to: 242-253

🧹 Nitpick comments (3)
middleware/adaptor/adaptor_test.go (3)

53-81: Prefer require in handler assertions

Using require.* inside net/http handler stops on first failure, keeping failures local and clearer.

Based on learnings


124-134: Reuse package-level constants here to avoid duplication

Remove local re-definitions and rely on the top-level expectedRequestURI/expectedBody/expectedHost/expectedRemoteAddr.

- expectedRequestURI := "/foo/bar?baz=123"
- expectedBody := "body 123 foo bar baz"
- expectedHost := "foobar.com"
- expectedRemoteAddr := "1.2.3.4:6789"

168-173: Make flush mandatory in this test

Assert ResponseWriter implements http.Flusher to catch regressions, then flush.

- fmt.Fprintf(w, "request body is ")
- if flusher, ok := w.(http.Flusher); ok {
-   flusher.Flush()
- }
- fmt.Fprintf(w, "%q", body)
+ fmt.Fprintf(w, "request body is ")
+ flusher, ok := w.(http.Flusher)
+ require.True(t, ok, "w does not implement http.Flusher")
+ flusher.Flush()
+ fmt.Fprintf(w, "%q", body)

As per coding guidelines

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a556c1e and cb828ff.

📒 Files selected for processing (2)
  • adapter_test.go (2 hunks)
  • middleware/adaptor/adaptor_test.go (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • adapter_test.go
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Format Go code using gofumpt (Make target: make format).
Run golangci-lint for linting (Make target: make lint).
Run go vet as part of audit to catch suspicious constructs (Make target: make audit).
Optimize struct field alignment with betteralign (Make target: make betteralign).
Apply gopls modernize to update code patterns (Make target: make modernize).

Files:

  • middleware/adaptor/adaptor_test.go
**/*_test.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*_test.go: Run the test suite with gotestsum (Make target: make test).
Run benchmarks with go test (Make target: make benchmark).

Files:

  • middleware/adaptor/adaptor_test.go
🧠 Learnings (3)
📚 Learning: 2024-11-10T23:44:13.704Z
Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/adaptor/adaptor.go:111-111
Timestamp: 2024-11-10T23:44:13.704Z
Learning: In the `middleware/adaptor/adaptor.go` file of the Fiber framework, when updating context handling, replacing `c.Context()` with `c.RequestCtx()` is appropriate to access the `fasthttp.RequestCtx`.

Applied to files:

  • middleware/adaptor/adaptor_test.go
📚 Learning: 2024-12-13T08:14:22.851Z
Learnt from: efectn
PR: gofiber/fiber#3162
File: hooks_test.go:228-228
Timestamp: 2024-12-13T08:14:22.851Z
Learning: In Go test files, prefer using the `require` methods from the `testify` package for assertions instead of manual comparisons and calls to `t.Fatal` or `t.Fatalf`.

Applied to files:

  • middleware/adaptor/adaptor_test.go
📚 Learning: 2024-11-29T12:37:27.581Z
Learnt from: efectn
PR: gofiber/fiber#3162
File: app_test.go:893-895
Timestamp: 2024-11-29T12:37:27.581Z
Learning: In the `Test_App_ShutdownWithContext` function in `app_test.go`, the `clientDone` channel is used to synchronize the client's request completion before proceeding, eliminating the need for additional `time.Sleep` calls.

Applied to files:

  • middleware/adaptor/adaptor_test.go
🧬 Code graph analysis (1)
middleware/adaptor/adaptor_test.go (4)
constants.go (4)
  • MethodPost (7-7)
  • StatusBadRequest (73-73)
  • StatusOK (52-52)
  • MethodGet (5-5)
middleware/adaptor/adaptor.go (1)
  • HTTPHandlerFunc (33-35)
app.go (2)
  • New (515-628)
  • TestConfig (1084-1095)
adapter_test.go (1)
  • Test_HTTPHandler_App_Test_Interrupted (146-175)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Compare
  • GitHub Check: unit (1.25.x, macos-13)
  • GitHub Check: repeated
  • GitHub Check: unit (1.25.x, windows-latest)
🔇 Additional comments (2)
middleware/adaptor/adaptor_test.go (2)

26-32: Good: hoisted shared test constants

Reduces duplication and resolves goconst noise. Nice.


212-225: LGTM: end-to-end flush path via app.Test

Solid sanity check for normal streaming completion.

@grivera64
Copy link
Member Author

@ReneWerner87 Now actually done 😂 We can wait for the workflows to complete before merging and everything should be good.

@gaby gaby added this to v3 Oct 16, 2025
@gaby gaby added this to the v3 milestone Oct 16, 2025
@ReneWerner87 ReneWerner87 merged commit c257f02 into gofiber:main Oct 20, 2025
15 of 16 checks passed
@github-project-automation github-project-automation bot moved this to Done in v3 Oct 20, 2025
@grivera64 grivera64 deleted the tests(adaptor)/add-flushing-tests branch October 20, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🐛 [Bug]: Adaptor does not flush when an net/http handler flushes

5 participants