File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,18 @@ protected static YdbConnection CreateOpenConnection()
2020
2121 protected static async Task < YdbConnection > CreateOpenConnectionAsync ( )
2222 {
23- var connection = CreateConnection ( ) ;
24- await connection . OpenAsync ( ) ;
25- return connection ;
23+ try
24+ {
25+ var connection = CreateConnection ( ) ;
26+ await connection . OpenAsync ( ) ;
27+ return connection ;
28+ }
29+ catch ( YdbException e ) when ( e is { Code : StatusCode . Unspecified , Message : "Session Source is disposed." } )
30+ {
31+ var connection = CreateConnection ( ) ;
32+ await connection . OpenAsync ( ) ;
33+ return connection ;
34+ }
2635 }
2736
2837 public async Task InitializeAsync ( ) => await OnInitializeAsync ( ) . ConfigureAwait ( false ) ;
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ public async Task DisableDiscovery_WhenPropertyIsTrue_SimpleWorking()
211211 public async Task OpenAsync_WhenCancelTokenIsCanceled_ThrowYdbException ( )
212212 {
213213 await using var connection = CreateConnection ( ) ;
214- connection . ConnectionString = ConnectionString ;
214+ connection . ConnectionString = ConnectionString + ";MinSessionPool=1" ;
215215 using var cts = new CancellationTokenSource ( ) ;
216216 cts . Cancel ( ) ;
217217 Assert . Equal ( "The connection pool has been exhausted, either raise 'MaxSessionPool' (currently 10) " +
You can’t perform that action at this time.
0 commit comments