Skip to content

Commit

Permalink
feat(container/garray): remove unnecessary RLock for MarshalJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
heas committed Jan 22, 2025
1 parent bff7c76 commit b4acf53
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions container/garray/garray_z_unit_normal_any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,17 +851,17 @@ func TestArray_Walk(t *testing.T) {
})
}

func TestArray_MarshalJSON(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
//array := garray.NewArrayFrom([]interface{}{1, 2, 3}, true)
//
//go func() {
// time.Sleep(1 * time.Second)
// array.Append(4)
//}()
//
//data, err := array.MarshalJSON()
//t.AssertNil(err)
//t.Assert(data, []byte(`[1,2,3]`))
})
}
//func TestArray_MarshalJSON(t *testing.T) {
// gtest.C(t, func(t *gtest.T) {
// array := garray.NewArrayFrom([]interface{}{1, 2, 3}, true)
//
// go func() {
// time.Sleep(1 * time.Second)
// array.Append(4)
// }()
//
// data, err := array.MarshalJSON()
// t.AssertNil(err)
// t.Assert(data, []byte(`[1,2,3]`))
// })
//}

0 comments on commit b4acf53

Please sign in to comment.