Skip to content

Commit

Permalink
otelmongo#39 Reomve parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Sep 9, 2024
1 parent 9b43a52 commit bafa299
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22
require (
github.com/stretchr/testify v1.9.0
go.mongodb.org/mongo-driver v1.16.1
go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.54.0
go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/trace v1.29.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/integration/mtest"
"go.mongodb.org/mongo-driver/mongo/options"

"go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo" // nolint:staticcheck // deprecated.
"go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
Expand All @@ -25,8 +25,6 @@ import (
type validator func(sdktrace.ReadOnlySpan) bool

func TestDBCrudOperation(t *testing.T) {
t.Parallel()

commonValidators := []validator{
func(s sdktrace.ReadOnlySpan) bool {
return assert.Equal(t, "test-collection.insert", s.Name(), "expected %s", s.Name())
Expand Down Expand Up @@ -94,8 +92,6 @@ func TestDBCrudOperation(t *testing.T) {

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))
mt.Run(title, func(mt *mtest.T) {
mt.Parallel()

sr := tracetest.NewSpanRecorder()
provider := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))

Expand Down Expand Up @@ -147,8 +143,6 @@ func TestDBCrudOperation(t *testing.T) {
}

func TestDBCollectionAttribute(t *testing.T) {
t.Parallel()

tt := []struct {
title string
operation func(context.Context, *mongo.Database) (interface{}, error)
Expand Down Expand Up @@ -205,8 +199,6 @@ func TestDBCollectionAttribute(t *testing.T) {

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))
mt.Run(tc.title, func(mt *mtest.T) {
mt.Parallel()

sr := tracetest.NewSpanRecorder()
provider := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))

Expand Down

0 comments on commit bafa299

Please sign in to comment.