Merge c58089110a51c9e0fa585c5a1c962ca989251359 into 43fe48e8a0f44af783116cdb010725e6bb50255f

This commit is contained in:
Samiul Sk 2026-10-07 13:28:18 -04:00 committed by GitHub
commit aac0f88aa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -800,6 +800,29 @@ func TestContextCopyNilErrorsAndAccepted(t *testing.T) {
assert.Nil(t, cp.Accepted)
}
func TestContextCopyRace(t *testing.T) {
c := &Context{}
var wg sync.WaitGroup
wg.Add(2)
go func() {
defer wg.Done()
for range 1000 {
c.Set("foo", "bar")
}
}()
go func() {
defer wg.Done()
for range 1000 {
c.Copy()
}
}()
wg.Wait()
}
func TestContextHandlerName(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
c.handlers = HandlersChain{func(c *Context) {}, handlerNameTest}