File tree Expand file tree Collapse file tree
source/causal-consistency/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 10011001 }
10021002 ]
10031003 },
1004+ {
1005+ "name" : " dropCollection" ,
1006+ "object" : " database0" ,
1007+ "arguments" : {
1008+ "session" : " session0" ,
1009+ "collection" : " causal-consistency-createCollection-test"
1010+ }
1011+ },
10041012 {
10051013 "name" : " createCollection" ,
10061014 "object" : " database0" ,
10071015 "arguments" : {
10081016 "session" : " session0" ,
1009- "collection" : " newcoll "
1017+ "collection" : " causal-consistency-createCollection-test "
10101018 }
10111019 }
10121020 ],
10281036 }
10291037 }
10301038 },
1039+ {
1040+ "commandStartedEvent" : {
1041+ "commandName" : " drop" ,
1042+ "command" : {
1043+ "drop" : " causal-consistency-createCollection-test" ,
1044+ "lsid" : {
1045+ "$$sessionLsid" : " session0"
1046+ }
1047+ }
1048+ }
1049+ },
10311050 {
10321051 "commandStartedEvent" : {
10331052 "commandName" : " create" ,
10341053 "command" : {
1035- "create" : " newcoll " ,
1054+ "create" : " causal-consistency-createCollection-test " ,
10361055 "lsid" : {
10371056 "$$sessionLsid" : " session0"
10381057 },
Original file line number Diff line number Diff line change @@ -336,15 +336,27 @@ tests:
336336 - description : " create includes afterClusterTime in causally consistent session"
337337 operations :
338338 - *find
339+ # Drop the collection first to make sure there's no name conflict during
340+ # createCollection.
341+ - name : dropCollection
342+ object : *database0
343+ arguments :
344+ session : *session0
345+ collection : &newCollectionName causal-consistency-createCollection-test
339346 - name : createCollection
340347 object : *database0
341348 arguments :
342349 session : *session0
343- collection : & newCollectionName newcoll
350+ collection : * newCollectionName
344351 expectEvents :
345352 - client : *client0
346353 events :
347354 - *findEvent
355+ - commandStartedEvent :
356+ commandName : drop
357+ command :
358+ drop : *newCollectionName
359+ lsid : { $$sessionLsid: *session0 }
348360 - commandStartedEvent :
349361 commandName : create
350362 command :
You can’t perform that action at this time.
0 commit comments