File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
projects/client/Unit/src/unit Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ public void Drain()
124
124
#pragma warning disable 0168
125
125
try
126
126
{
127
- for ( int i = 0 ; i < 1000 ; i ++ )
127
+ for ( int i = 0 ; i < 100 ; i ++ )
128
128
{
129
129
BasicDeliverEventArgs ea = m_subscription . Next ( ) ;
130
130
if ( ea != null )
@@ -139,10 +139,12 @@ public void Drain()
139
139
} catch ( AlreadyClosedException ace )
140
140
{
141
141
// expected
142
+ } finally
143
+ {
144
+ m_subscription . Close ( ) ;
142
145
}
143
146
#pragma warning restore
144
147
145
- m_subscription . Close ( ) ;
146
148
}
147
149
148
150
protected void PostProcess ( )
@@ -181,7 +183,7 @@ protected void TestConcurrentIterationWithDrainer(bool ack)
181
183
PreparedQueue ( q ) ;
182
184
183
185
List < Thread > ts = new List < Thread > ( ) ;
184
- for ( int i = 0 ; i < 10 ; i ++ )
186
+ for ( int i = 0 ; i < 50 ; i ++ )
185
187
{
186
188
SubscriptionDrainer drainer = new SubscriptionDrainer ( sub , ack ) ;
187
189
Thread t = new Thread ( drainer . Drain ) ;
You can’t perform that action at this time.
0 commit comments