@@ -70,7 +70,8 @@ public void SelectServer_loadbalancing_prose_test([Values(false, true)] bool asy
70
70
71
71
const string applicationName = "loadBalancingTest" ;
72
72
const int threadsCount = 10 ;
73
- const int commandsPerThreadCount = 10 ;
73
+ const int commandsFailPointPerThreadCount = 10 ;
74
+ const int commandsPerThreadCount = 100 ;
74
75
const double maxCommandsOnSlowServerRatio = 0.3 ; // temporary set slow server load to 30% from 25% until find timings are investigated
75
76
const double operationsCountTolerance = 0.10 ;
76
77
@@ -102,26 +103,26 @@ public void SelectServer_loadbalancing_prose_test([Values(false, true)] bool asy
102
103
channel . Dispose ( ) ;
103
104
}
104
105
105
- var ( allCount , eventsOnSlowServerCount ) = ExecuteFindOperations ( collection , slowServer . ServerId ) ;
106
+ var ( allCount , eventsOnSlowServerCount ) = ExecuteFindOperations ( collection , slowServer . ServerId , commandsFailPointPerThreadCount ) ;
106
107
eventsOnSlowServerCount . Should ( ) . BeLessThan ( ( int ) ( allCount * maxCommandsOnSlowServerRatio ) ) ;
107
108
108
109
failPoint . Dispose ( ) ;
109
110
110
- ( allCount , eventsOnSlowServerCount ) = ExecuteFindOperations ( collection , slowServer . ServerId ) ;
111
+ ( allCount , eventsOnSlowServerCount ) = ExecuteFindOperations ( collection , slowServer . ServerId , commandsPerThreadCount ) ;
111
112
112
113
var singleServerOperationsPortion = allCount / 2 ;
113
114
var singleServerOperationsRange = ( int ) Math . Ceiling ( allCount * operationsCountTolerance ) ;
114
115
115
116
eventsOnSlowServerCount . Should ( ) . BeInRange ( singleServerOperationsPortion - singleServerOperationsRange , singleServerOperationsPortion + singleServerOperationsRange ) ;
116
117
}
117
118
118
- ( int allCount , int slowServerCount ) ExecuteFindOperations ( IMongoCollection < BsonDocument > collection , ServerId serverId )
119
+ ( int allCount , int slowServerCount ) ExecuteFindOperations ( IMongoCollection < BsonDocument > collection , ServerId serverId , int operationsCount )
119
120
{
120
121
eventCapturer . Clear ( ) ;
121
122
122
123
ThreadingUtilities . ExecuteOnNewThreads ( threadsCount , __ =>
123
124
{
124
- for ( int i = 0 ; i < commandsPerThreadCount ; i ++ )
125
+ for ( int i = 0 ; i < operationsCount ; i ++ )
125
126
{
126
127
if ( async)
127
128
{
0 commit comments