File tree 2 files changed +6
-4
lines changed
src/NHibernate.Test/SystemTransactions
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -539,10 +539,11 @@ public void CanUseSessionOutsideOfScopeAfterScope(bool explicitFlush)
539
539
}
540
540
var count = 0 ;
541
541
Assert . DoesNotThrow ( ( ) => count = s . Query < Person > ( ) . Count ( ) , "Failed using the session after scope." ) ;
542
- if ( count != 1 )
542
+ const int expectedCount = 1 ;
543
+ if ( count != expectedCount )
543
544
// We are not testing that here, so just issue a warning. Do not use DodgeTransactionCompletionDelayIfRequired
544
545
// before previous assert. We want to ascertain the session is usable in any cases.
545
- Assert . Warn ( $ "Unexpected entity count: { count } instead of 1 . The transaction seems to have a delayed commit.") ;
546
+ Assert . Warn ( $ "Unexpected entity count: { count } instead of { expectedCount } . The transaction seems to have a delayed commit.") ;
546
547
}
547
548
}
548
549
Original file line number Diff line number Diff line change @@ -284,10 +284,11 @@ public void CanUseSessionOutsideOfScopeAfterScope(bool explicitFlush)
284
284
}
285
285
var count = 0 ;
286
286
Assert . DoesNotThrow ( ( ) => count = s . Query < Person > ( ) . Count ( ) , "Failed using the session after scope." ) ;
287
- if ( count != 1 )
287
+ const int expectedCount = 1 ;
288
+ if ( count != expectedCount )
288
289
// We are not testing that here, so just issue a warning. Do not use DodgeTransactionCompletionDelayIfRequired
289
290
// before previous assert. We want to ascertain the session is usable in any cases.
290
- Assert . Warn ( $ "Unexpected entity count: { count } instead of 1 . The transaction seems to have a delayed commit.") ;
291
+ Assert . Warn ( $ "Unexpected entity count: { count } instead of { expectedCount } . The transaction seems to have a delayed commit.") ;
291
292
}
292
293
}
293
294
You can’t perform that action at this time.
0 commit comments