Skip to content

Commit

Permalink
升级组件
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Dec 17, 2023
1 parent 5b96d14 commit 9ce5721
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ func TestPush(t *testing.T) {
var lockA sync.Mutex
queue.Subscribe("test", "A", 2, func(subscribeName string, lstMessage collections.ListAny, remainingCount int) {
assert.Equal(t, "A", subscribeName)
var lst collections.List[int]
lstMessage.MapToList(&lst)
lst := collections.NewList[int]()
lstMessage.Foreach(func(item *any) {
lst.Add((*item).(int))
})

lockA.Lock()
defer lockA.Unlock()
Expand All @@ -33,8 +35,10 @@ func TestPush(t *testing.T) {
var lockB sync.Mutex
queue.Subscribe("test", "B", 4, func(subscribeName string, lstMessage collections.ListAny, remainingCount int) {
assert.Equal(t, "B", subscribeName)
var lst collections.List[int]
lstMessage.MapToList(&lst)
lst := collections.NewList[int]()
lstMessage.Foreach(func(item *any) {
lst.Add((*item).(int))
})

lockB.Lock()
defer lockB.Unlock()
Expand Down

0 comments on commit 9ce5721

Please sign in to comment.