Skip to content

Commit

Permalink
fix: unittest
Browse files Browse the repository at this point in the history
Signed-off-by: chyezh <[email protected]>
  • Loading branch information
chyezh committed Jan 22, 2025
1 parent eb4d9e3 commit cd1b827
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions internal/streamingcoord/client/broadcast/watcher_resuming.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/pkg/errors"
"github.com/cockroachdb/errors"
"go.uber.org/zap"

"github.com/milvus-io/milvus/pkg/log"
Expand Down Expand Up @@ -141,10 +141,9 @@ func (evs *pendingEvents) AddPendingEvent(ev *pendingEvent) bool {
if existEv, ok := evs.evs[id]; ok {
existEv.notifier = append(existEv.notifier, ev.notifier...)
return true
} else {
evs.evs[id] = ev
return false
}
evs.evs[id] = ev
return false
}

func (evs *pendingEvents) Notify(ev *message.BroadcastEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"sync"

"github.com/pkg/errors"
"github.com/cockroachdb/errors"
"go.uber.org/zap"

"github.com/milvus-io/milvus/internal/streamingcoord/server/resource"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestBroadcaster(t *testing.T) {
// Test broadcast with a already exist resource key.
for {
var err error
result, err = bc.Broadcast(context.Background(), createNewBroadcastMsg([]string{"v1", "v2", "v3"}, message.NewCollectionNameResourceKey("c7")))
_, err = bc.Broadcast(context.Background(), createNewBroadcastMsg([]string{"v1", "v2", "v3"}, message.NewCollectionNameResourceKey("c7")))
if errors.Is(err, errResourceKeyHeld) {
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package broadcast

import (
"context"
"errors"
"io"

"github.com/cockroachdb/errors"
"go.uber.org/zap"

"github.com/milvus-io/milvus/internal/streamingcoord/server/broadcaster"
Expand Down

0 comments on commit cd1b827

Please sign in to comment.