@@ -15,13 +15,14 @@ package stream
15
15
16
16
import (
17
17
"context"
18
- "github.com/stretchr/testify/assert"
19
- "github.com/stretchr/testify/require"
20
18
"sync"
21
19
"sync/atomic"
22
20
"testing"
23
21
"time"
24
22
23
+ "github.com/stretchr/testify/assert"
24
+ "github.com/stretchr/testify/require"
25
+
25
26
rtv1 "github.com/dapr/dapr/pkg/proto/runtime/v1"
26
27
"github.com/dapr/dapr/tests/integration/framework"
27
28
"github.com/dapr/dapr/tests/integration/framework/process/daprd"
@@ -145,8 +146,8 @@ func (m *multi) Run(t *testing.T, ctx context.Context) {
145
146
stream2 : "b" ,
146
147
stream3 : "c" ,
147
148
} {
148
- event , err := stream .Recv ()
149
- require .NoError (t , err )
149
+ event , recvErr := stream .Recv ()
150
+ require .NoError (t , recvErr )
150
151
assert .Equal (t , topic , event .GetEventMessage ().GetTopic ())
151
152
}
152
153
@@ -226,7 +227,7 @@ func (m *multi) Run(t *testing.T, ctx context.Context) {
226
227
227
228
for receivedMessages < expectedMessages {
228
229
event , recvErr := stream .Recv ()
229
- require .NoError (c , recvErr )
230
+ assert .NoError (c , recvErr )
230
231
assert .Equal (c , singleTopicMultipleSubscribers , event .GetEventMessage ().GetTopic ())
231
232
232
233
sendErr := stream .Send (& rtv1.SubscribeTopicEventsRequestAlpha1 {
@@ -237,7 +238,7 @@ func (m *multi) Run(t *testing.T, ctx context.Context) {
237
238
},
238
239
},
239
240
})
240
- require .NoError (c , sendErr )
241
+ assert .NoError (c , sendErr )
241
242
242
243
receivedTotal .Add (1 )
243
244
receivedMessages ++
@@ -256,6 +257,6 @@ func (m *multi) Run(t *testing.T, ctx context.Context) {
256
257
257
258
assert .Eventually (t , func () bool {
258
259
wg .Wait ()
259
- return receivedTotal .Load () == int32 (messagesToSend * len (subscribers ))
260
+ return receivedTotal .Load () == int32 (messagesToSend * len (subscribers )) //nolint:gosec
260
261
}, time .Second * 10 , time .Millisecond * 10 )
261
262
}
0 commit comments