(t *testing.T)
| 1199 | } |
| 1200 | |
| 1201 | func Test_App_Remove_Route_Concurrent(t *testing.T) { |
| 1202 | t.Parallel() |
| 1203 | app := New() |
| 1204 | |
| 1205 | // Add test route |
| 1206 | app.Get("/test", func(c Ctx) error { |
| 1207 | return c.SendStatus(StatusOK) |
| 1208 | }) |
| 1209 | |
| 1210 | // Concurrently remove and add routes |
| 1211 | var wg sync.WaitGroup |
| 1212 | for range 10 { |
| 1213 | wg.Go(func() { |
| 1214 | app.RemoveRoute("/test", MethodGet) |
| 1215 | app.Get("/test", func(c Ctx) error { |
| 1216 | return c.SendStatus(StatusOK) |
| 1217 | }) |
| 1218 | }) |
| 1219 | } |
| 1220 | wg.Wait() |
| 1221 | |
| 1222 | // Verify final state |
| 1223 | app.RebuildTree() |
| 1224 | verifyRequest(t, app, "/test", StatusOK) |
| 1225 | } |
| 1226 | |
| 1227 | func Test_Route_Registration_Prevent_Duplicate_With_Middleware(t *testing.T) { |
| 1228 | t.Parallel() |
nothing calls this directly
no test coverage detected