@@ -234,7 +234,7 @@ public void TestAggregateOutputToCollection()
234234 public void TestAggregateWriteConcern ( )
235235 {
236236 RequireServer . Check ( ) . Supports ( Feature . AggregateOut , Feature . CommandsThatWriteAcceptWriteConcern ) . ClusterType ( ClusterType . ReplicaSet ) ;
237- var writeConcern = new WriteConcern ( 9 ) ;
237+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
238238 var args = new AggregateArgs
239239 {
240240 Pipeline = new [ ] { BsonDocument . Parse ( "{ $out : 'out' }" ) }
@@ -731,7 +731,7 @@ public void TestCreateIndexWithStorageEngine()
731731 public void TestCreateIndexWriteConcern ( )
732732 {
733733 RequireServer . Check ( ) . Supports ( Feature . AggregateOut , Feature . CommandsThatWriteAcceptWriteConcern ) . ClusterType ( ClusterType . ReplicaSet ) ;
734- var writeConcern = new WriteConcern ( 9 ) ;
734+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
735735 var keys = IndexKeys . Ascending ( "x" ) ;
736736
737737 var exception = Record . Exception ( ( ) => _collection . WithWriteConcern ( writeConcern ) . CreateIndex ( keys ) ) ;
@@ -870,7 +870,7 @@ public void TestDropIndex()
870870 public void TestDropIndexWriteConcern ( )
871871 {
872872 RequireServer . Check ( ) . Supports ( Feature . AggregateOut , Feature . CommandsThatWriteAcceptWriteConcern ) . ClusterType ( ClusterType . ReplicaSet ) ;
873- var writeConcern = new WriteConcern ( 9 ) ;
873+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
874874
875875 var exception = Record . Exception ( ( ) => _collection . WithWriteConcern ( writeConcern ) . DropIndex ( "x" ) ) ;
876876
@@ -1057,7 +1057,7 @@ public void TestFindAndModifyReplaceWithWriteConcernError()
10571057 _collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
10581058 var collectionSettings = new MongoCollectionSettings
10591059 {
1060- WriteConcern = new WriteConcern ( 9 )
1060+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
10611061 } ;
10621062 var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
10631063 var args = new FindAndModifyArgs
@@ -1094,7 +1094,7 @@ public void TestFindAndModifyUpdateWithWriteConcernError()
10941094 _collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
10951095 var collectionSettings = new MongoCollectionSettings
10961096 {
1097- WriteConcern = new WriteConcern ( 9 )
1097+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
10981098 } ;
10991099 var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
11001100 var args = new FindAndModifyArgs
@@ -1227,7 +1227,7 @@ public void TestFindAndRemoveWithWriteConcernError()
12271227 _collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
12281228 var collectionSettings = new MongoCollectionSettings
12291229 {
1230- WriteConcern = new WriteConcern ( 9 )
1230+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
12311231 } ;
12321232 var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
12331233 var args = new FindAndRemoveArgs
@@ -2501,7 +2501,7 @@ public void TestInsertWithWriteConcernError()
25012501 var document = new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ;
25022502 var collectionSettings = new MongoCollectionSettings
25032503 {
2504- WriteConcern = new WriteConcern ( 9 )
2504+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
25052505 } ;
25062506 var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
25072507
@@ -2861,7 +2861,7 @@ public void TestMapReduceWriteConcern()
28612861 _collection . Insert ( new BsonDocument { { "A" , 1 } , { "B" , 2 } } ) ;
28622862 _collection . Insert ( new BsonDocument { { "B" , 1 } , { "C" , 2 } } ) ;
28632863 _collection . Insert ( new BsonDocument { { "X" , 1 } , { "B" , 2 } } ) ;
2864- var writeConcern = new WriteConcern ( 9 ) ;
2864+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
28652865 var map =
28662866 "function() {\n " +
28672867 " for (var key in this) {\n " +
@@ -2955,7 +2955,7 @@ public void TestReIndexWriteConcern()
29552955 {
29562956 RequireServer . Check ( ) . Supports ( Feature . CommandsThatWriteAcceptWriteConcern ) . ClusterType ( ClusterType . ReplicaSet ) ;
29572957 EnsureCollectionExists ( _collection . Name ) ;
2958- var writeConcern = new WriteConcern ( 9 ) ;
2958+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
29592959
29602960 var exception = Record . Exception ( ( ) => _collection . WithWriteConcern ( writeConcern ) . ReIndex ( ) ) ;
29612961
@@ -3015,7 +3015,7 @@ public void TestRemoveWithWriteConcernError()
30153015 _collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
30163016 var collectionSettings = new MongoCollectionSettings
30173017 {
3018- WriteConcern = new WriteConcern ( 9 )
3018+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
30193019 } ;
30203020 var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
30213021 var query = Query . EQ ( "x" , 1 ) ;
@@ -3294,7 +3294,7 @@ public void TestUpdateWithWriteConcernError()
32943294 _collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
32953295 var collectionSettings = new MongoCollectionSettings
32963296 {
3297- WriteConcern = new WriteConcern ( 9 )
3297+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
32983298 } ;
32993299 var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
33003300 var query = Query . EQ ( "x" , 1 ) ;
0 commit comments