Skip to content

Commit

Permalink
Update test, use the context created by engine.
Browse files Browse the repository at this point in the history
  • Loading branch information
3DRX committed Jul 10, 2024
1 parent c6d27a9 commit dbea427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/route/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,6 @@ func TestAcquireHijackConn(t *testing.T) {

func TestHandleParamsReassignInHandleFunc(t *testing.T) {
e := NewEngine(config.NewOptions(nil))
ctx := app.NewContext(3)
routes := []string{
"/:a/:b/:c",
}
Expand All @@ -1052,6 +1051,7 @@ func TestHandleParamsReassignInHandleFunc(t *testing.T) {
"/alksjdlakjd/ooo/askda",
"/alksjdlakjd/ooo/askda",
}
ctx := e.ctxPool.Get().(*app.RequestContext)
for _, tr := range testRoutes {
r := protocol.NewRequest(http.MethodGet, tr, nil)
r.CopyTo(&ctx.Request)
Expand Down

0 comments on commit dbea427

Please sign in to comment.