@@ -234,7 +234,7 @@ public void TestAggregateOutputToCollection()
234
234
public void TestAggregateWriteConcern ( )
235
235
{
236
236
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 ) ) ;
238
238
var args = new AggregateArgs
239
239
{
240
240
Pipeline = new [ ] { BsonDocument . Parse ( "{ $out : 'out' }" ) }
@@ -731,7 +731,7 @@ public void TestCreateIndexWithStorageEngine()
731
731
public void TestCreateIndexWriteConcern ( )
732
732
{
733
733
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 ) ) ;
735
735
var keys = IndexKeys . Ascending ( "x" ) ;
736
736
737
737
var exception = Record . Exception ( ( ) => _collection . WithWriteConcern ( writeConcern ) . CreateIndex ( keys ) ) ;
@@ -870,7 +870,7 @@ public void TestDropIndex()
870
870
public void TestDropIndexWriteConcern ( )
871
871
{
872
872
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 ) ) ;
874
874
875
875
var exception = Record . Exception ( ( ) => _collection . WithWriteConcern ( writeConcern ) . DropIndex ( "x" ) ) ;
876
876
@@ -1057,7 +1057,7 @@ public void TestFindAndModifyReplaceWithWriteConcernError()
1057
1057
_collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
1058
1058
var collectionSettings = new MongoCollectionSettings
1059
1059
{
1060
- WriteConcern = new WriteConcern ( 9 )
1060
+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
1061
1061
} ;
1062
1062
var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
1063
1063
var args = new FindAndModifyArgs
@@ -1094,7 +1094,7 @@ public void TestFindAndModifyUpdateWithWriteConcernError()
1094
1094
_collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
1095
1095
var collectionSettings = new MongoCollectionSettings
1096
1096
{
1097
- WriteConcern = new WriteConcern ( 9 )
1097
+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
1098
1098
} ;
1099
1099
var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
1100
1100
var args = new FindAndModifyArgs
@@ -1227,7 +1227,7 @@ public void TestFindAndRemoveWithWriteConcernError()
1227
1227
_collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
1228
1228
var collectionSettings = new MongoCollectionSettings
1229
1229
{
1230
- WriteConcern = new WriteConcern ( 9 )
1230
+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
1231
1231
} ;
1232
1232
var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
1233
1233
var args = new FindAndRemoveArgs
@@ -2501,7 +2501,7 @@ public void TestInsertWithWriteConcernError()
2501
2501
var document = new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ;
2502
2502
var collectionSettings = new MongoCollectionSettings
2503
2503
{
2504
- WriteConcern = new WriteConcern ( 9 )
2504
+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
2505
2505
} ;
2506
2506
var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
2507
2507
@@ -2861,7 +2861,7 @@ public void TestMapReduceWriteConcern()
2861
2861
_collection . Insert ( new BsonDocument { { "A" , 1 } , { "B" , 2 } } ) ;
2862
2862
_collection . Insert ( new BsonDocument { { "B" , 1 } , { "C" , 2 } } ) ;
2863
2863
_collection . Insert ( new BsonDocument { { "X" , 1 } , { "B" , 2 } } ) ;
2864
- var writeConcern = new WriteConcern ( 9 ) ;
2864
+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
2865
2865
var map =
2866
2866
"function() {\n " +
2867
2867
" for (var key in this) {\n " +
@@ -2955,7 +2955,7 @@ public void TestReIndexWriteConcern()
2955
2955
{
2956
2956
RequireServer . Check ( ) . Supports ( Feature . CommandsThatWriteAcceptWriteConcern ) . ClusterType ( ClusterType . ReplicaSet ) ;
2957
2957
EnsureCollectionExists ( _collection . Name ) ;
2958
- var writeConcern = new WriteConcern ( 9 ) ;
2958
+ var writeConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) ) ;
2959
2959
2960
2960
var exception = Record . Exception ( ( ) => _collection . WithWriteConcern ( writeConcern ) . ReIndex ( ) ) ;
2961
2961
@@ -3015,7 +3015,7 @@ public void TestRemoveWithWriteConcernError()
3015
3015
_collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
3016
3016
var collectionSettings = new MongoCollectionSettings
3017
3017
{
3018
- WriteConcern = new WriteConcern ( 9 )
3018
+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
3019
3019
} ;
3020
3020
var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
3021
3021
var query = Query . EQ ( "x" , 1 ) ;
@@ -3294,7 +3294,7 @@ public void TestUpdateWithWriteConcernError()
3294
3294
_collection . Insert ( new BsonDocument { { "_id" , 1 } , { "x" , 1 } } ) ;
3295
3295
var collectionSettings = new MongoCollectionSettings
3296
3296
{
3297
- WriteConcern = new WriteConcern ( 9 )
3297
+ WriteConcern = new WriteConcern ( 9 , wTimeout : TimeSpan . FromMilliseconds ( 1 ) )
3298
3298
} ;
3299
3299
var collection = _database . GetCollection ( _collection . Name , collectionSettings ) ;
3300
3300
var query = Query . EQ ( "x" , 1 ) ;
0 commit comments