Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 feat: Add Load-Shedding Middleware #3264

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update
Erfan Momeni authored and Erfan Momeni committed Dec 29, 2024
commit bd4dc0c02f84e57f5f36b6d6715522ec92707ad2
6 changes: 1 addition & 5 deletions middleware/loadshedding/loadshedding_test.go
Original file line number Diff line number Diff line change
@@ -59,11 +59,7 @@ func Test_LoadSheddingTimeout(t *testing.T) {
loadSheddingHandler,
nil,
))
app.Get("/", func(c fiber.Ctx) error {
// Simulate long-running request without creating goroutines
time.Sleep(2 * time.Second)
return c.SendString("This should not appear")
})
app.Get("/", timeoutHandler)

// Create a custom request
req := httptest.NewRequest(fiber.MethodGet, "/", nil)