Skip to content

Commit 989b3e1

Browse files
committed
GODRIVER-2851 Fix failing "TestCMAPProse" test. (#1316)
1 parent b687278 commit 989b3e1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

x/mongo/driver/topology/cmap_prose_test.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ func TestCMAPProse(t *testing.T) {
106106
})
107107
t.Run("checkOut", func(t *testing.T) {
108108
t.Run("connection error publishes events", func(t *testing.T) {
109-
// TODO(GODRIVER-2851): Fix and unskip this test case.
110-
t.Skip("Test fails frequently, skipping. See GODRIVER-2851")
111-
112109
// If checkOut() creates a connection that encounters an error while connecting,
113110
// the pool should publish connection created and closed events and checkOut should
114111
// return the error.
@@ -131,8 +128,7 @@ func TestCMAPProse(t *testing.T) {
131128
_, err := pool.checkOut(context.Background())
132129
assert.NotNil(t, err, "expected checkOut() error, got nil")
133130

134-
assert.Equal(t, 1, len(created), "expected 1 opened events, got %d", len(created))
135-
assert.Equal(t, 1, len(closed), "expected 1 closed events, got %d", len(closed))
131+
assertConnectionCounts(t, pool, 1, 1)
136132
})
137133
t.Run("pool is empty", func(t *testing.T) {
138134
// If a checkOut() has to create a new connection and that connection encounters an

0 commit comments

Comments
 (0)