Skip to content

Commit

Permalink
Fix test assert
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Feb 22, 2024
1 parent 4720014 commit 7594a8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/demoserver/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func TestElizaServer(t *testing.T) {
defer wg.Done()
for _, sentence := range sendValues {
err := stream.Send(&elizav1.ConverseRequest{Sentence: sentence})
if assert.ErrorContainsf(t, err, `failed for string sentence: "%s"`, sentence) {
if !assert.NoError(t, err, `failed for string sentence: "%s"`, sentence) {
break
}
}
assert.NoError(t, stream.CloseRequest())
assert.NoError(t, stream.CloseRequest())
}()
go func() {
defer wg.Done()
Expand All @@ -92,7 +92,7 @@ func TestElizaServer(t *testing.T) {
assert.NotEmpty(t, msg.GetSentence())
receivedValues = append(receivedValues, msg.GetSentence())
}
assert.NoError(t, stream.CloseResponse())
assert.NoError(t, stream.CloseResponse())
}()
wg.Wait()
assert.Equal(t, len(receivedValues), len(sendValues))
Expand Down

0 comments on commit 7594a8b

Please sign in to comment.