@@ -4,6 +4,7 @@ const { LEGACY_HELLO_COMMAND } = require('../../../src/constants');
4
4
5
5
const { setupDatabase } = require ( '../shared' ) ;
6
6
const { expect } = require ( 'chai' ) ;
7
+ const { skipBrokenAuthTestBeforeEachHook } = require ( '../../tools/runner/hooks/configuration' ) ;
7
8
8
9
const ignoredCommands = [ LEGACY_HELLO_COMMAND , 'endSessions' ] ;
9
10
const test = { commands : { started : [ ] , succeeded : [ ] } } ;
@@ -14,6 +15,18 @@ describe('Causal Consistency - prose tests', function () {
14
15
return setupDatabase ( this . configuration ) ;
15
16
} ) ;
16
17
18
+ beforeEach (
19
+ skipBrokenAuthTestBeforeEachHook ( {
20
+ skippedTests : [
21
+ '2. The first read in a causally consistent session must not send afterClusterTime to the server' ,
22
+ 'case: successful read with causal consistency' ,
23
+ 'case: second operation is findOne' ,
24
+ 'case: successful insert' ,
25
+ '6. A read operation in a ClientSession that is not causally consistent should not include the afterClusterTime parameter in the command sent to the server'
26
+ ]
27
+ } )
28
+ ) ;
29
+
17
30
beforeEach ( function ( ) {
18
31
test . commands = { started : [ ] , succeeded : [ ] } ;
19
32
test . client = this . configuration . newClient ( { w : 1 } , { maxPoolSize : 1 , monitorCommands : true } ) ;
@@ -29,7 +42,7 @@ describe('Causal Consistency - prose tests', function () {
29
42
} ) ;
30
43
31
44
afterEach ( ( ) => {
32
- return test . client . close ( ) ;
45
+ return test . client ? test . client . close ( ) : Promise . resolve ( ) ;
33
46
} ) ;
34
47
35
48
it (
@@ -42,10 +55,9 @@ describe('Causal Consistency - prose tests', function () {
42
55
*/
43
56
{
44
57
metadata : {
45
- requires : { topology : [ 'replicaset' , 'sharded' ] , auth : 'disabled' } ,
58
+ requires : { topology : [ 'replicaset' , 'sharded' ] } ,
46
59
// Skipping session leak tests b/c these are explicit sessions
47
- sessions : { skipLeakTests : true } ,
48
- skipReason : 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
60
+ sessions : { skipLeakTests : true }
49
61
} ,
50
62
51
63
test : function ( ) {
@@ -81,10 +93,9 @@ describe('Causal Consistency - prose tests', function () {
81
93
82
94
it ( 'case: successful read with causal consistency' , {
83
95
metadata : {
84
- requires : { topology : [ 'replicaset' , 'sharded' ] , auth : 'disabled' } ,
96
+ requires : { topology : [ 'replicaset' , 'sharded' ] } ,
85
97
// Skipping session leak tests b/c these are explicit sessions
86
- sessions : { skipLeakTests : true } ,
87
- skipReason : 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
98
+ sessions : { skipLeakTests : true }
88
99
} ,
89
100
90
101
test : function ( ) {
@@ -120,10 +131,9 @@ describe('Causal Consistency - prose tests', function () {
120
131
( ) => {
121
132
it ( 'case: second operation is findOne' , {
122
133
metadata : {
123
- requires : { topology : [ 'replicaset' , 'sharded' ] , auth : 'disabled' } ,
134
+ requires : { topology : [ 'replicaset' , 'sharded' ] } ,
124
135
// Skipping session leak tests b/c these are explicit sessions
125
- sessions : { skipLeakTests : true } ,
126
- skipReason : 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
136
+ sessions : { skipLeakTests : true }
127
137
} ,
128
138
129
139
test : function ( ) {
@@ -166,10 +176,9 @@ describe('Causal Consistency - prose tests', function () {
166
176
( ) => {
167
177
it ( 'case: successful insert' , {
168
178
metadata : {
169
- requires : { topology : [ 'replicaset' , 'sharded' ] , auth : 'disabled' } ,
179
+ requires : { topology : [ 'replicaset' , 'sharded' ] } ,
170
180
// Skipping session leak tests b/c these are explicit sessions
171
- sessions : { skipLeakTests : true } ,
172
- skipReason : 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
181
+ sessions : { skipLeakTests : true }
173
182
} ,
174
183
175
184
test : function ( ) {
@@ -207,10 +216,9 @@ describe('Causal Consistency - prose tests', function () {
207
216
*/
208
217
{
209
218
metadata : {
210
- requires : { topology : [ 'replicaset' , 'sharded' ] , auth : 'disabled' } ,
219
+ requires : { topology : [ 'replicaset' , 'sharded' ] } ,
211
220
// Skipping session leak tests b/c these are explicit sessions
212
- sessions : { skipLeakTests : true } ,
213
- skipReason : 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
221
+ sessions : { skipLeakTests : true }
214
222
} ,
215
223
216
224
test : function ( ) {
0 commit comments