diff --git a/internal/impl/elasticsearch/v8/integration_test.go b/internal/impl/elasticsearch/v8/integration_test.go index ac423b32ea..b09dff8c1c 100644 --- a/internal/impl/elasticsearch/v8/integration_test.go +++ b/internal/impl/elasticsearch/v8/integration_test.go @@ -14,7 +14,9 @@ package elasticsearch import ( + "context" "encoding/json" + "errors" "fmt" "testing" "time" @@ -79,7 +81,9 @@ elasticsearch_v8: require.NoError(t, err) go func() { - require.NoError(t, stream.Run(ctx)) + if err := stream.Run(ctx); err != nil && !errors.Is(err, context.Canceled) { + t.Error(err) + } }() defer func() { err := stream.StopWithin(time.Second * 3) diff --git a/internal/impl/elasticsearch/v9/integration_test.go b/internal/impl/elasticsearch/v9/integration_test.go index e1a2232994..70f2246acf 100644 --- a/internal/impl/elasticsearch/v9/integration_test.go +++ b/internal/impl/elasticsearch/v9/integration_test.go @@ -14,7 +14,9 @@ package elasticsearch import ( + "context" "encoding/json" + "errors" "fmt" "testing" "time" @@ -78,7 +80,9 @@ elasticsearch_v9: require.NoError(t, err) go func() { - require.NoError(t, stream.Run(ctx)) + if err := stream.Run(ctx); err != nil && !errors.Is(err, context.Canceled) { + t.Error(err) + } }() defer func() { err := stream.StopWithin(time.Second * 3)