Skip to content

Commit

Permalink
Sessions test plan.
Browse files Browse the repository at this point in the history
GODRIVER-52

Change-Id: I6a8bd4ffa33d478bf6df2974e963a6339622f3c0
  • Loading branch information
rfblue2 authored and Divjot Arora committed Jul 24, 2018
1 parent e18bcf0 commit aa6b7a8
Show file tree
Hide file tree
Showing 4 changed files with 821 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,14 @@ tasks:
commands:
- func: bootstrap-mongo-orchestration
vars:
topology: "server"
auth: "auth"
ssl: "ssl"
TOPOLOGY: "server"
AUTH: "auth"
SSL: "ssl"
- func: run-tests
vars:
topology: "server"
auth: "auth"
ssl: "ssl"
TOPOLOGY: "server"
AUTH: "auth"
SSL: "ssl"
MONGO_GO_DRIVER_COMPRESSOR: "snappy"

- name: test-replicaset-noauth-nossl
Expand Down
5 changes: 2 additions & 3 deletions internal/testutil/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@ func IsNil(object interface{}) bool {
// RequireNotNil throws an error if var is nil
func RequireNotNil(t *testing.T, variable interface{}, msgFormat string, msgVars ...interface{}) {
if IsNil(variable) {
t.Errorf(msgFormat, msgVars...)
t.FailNow()
t.Fatalf(msgFormat, msgVars...)
}
}

// RequireNil throws an error if var is not nil
func RequireNil(t *testing.T, variable interface{}, msgFormat string, msgVars ...interface{}) {
if !IsNil(variable) {
t.Errorf(msgFormat, msgVars...)
t.Fatalf(msgFormat, msgVars...)
}
}

Expand Down
2 changes: 2 additions & 0 deletions mongo/command_monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/mongodb/mongo-go-driver/bson"
"github.com/mongodb/mongo-go-driver/core/event"
"github.com/mongodb/mongo-go-driver/core/readpref"
"github.com/mongodb/mongo-go-driver/core/session"
"github.com/mongodb/mongo-go-driver/core/writeconcern"
"github.com/mongodb/mongo-go-driver/internal/testutil"
"github.com/mongodb/mongo-go-driver/internal/testutil/helpers"
Expand Down Expand Up @@ -47,6 +48,7 @@ func createMonitoredClient(t *testing.T) *Client {
topology: testutil.MonitoredTopology(t, monitor),
connString: testutil.ConnString(t),
readPreference: readpref.Primary(),
clock: &session.ClusterClock{},
}
}

Expand Down
Loading

0 comments on commit aa6b7a8

Please sign in to comment.