@@ -192,12 +192,12 @@ public async Task CanUseSessionWithManyScopesAsync(bool explicitFlush)
192192 // being concurrently disposed of. See https://github.com/nhibernate/nhibernate-core/pull/1505 for more details.
193193 if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
194194 Assert . Ignore ( "ODBC sometimes fails on second scope by checking the previous transaction status, which may yield an object disposed exception" ) ;
195- // SAP HANA & SQL Anywhere .Net provider always causes system transactions to be distributed, causing them to
195+ // SAP HANA & SQL Anywhere .Net providers always cause system transactions to be distributed, causing them to
196196 // complete on concurrent threads. This creates race conditions when chaining scopes, the subsequent scope usage
197197 // finding the connection still enlisted in the previous transaction, its complete being still not finished
198198 // on its own thread.
199199 if ( Sfi . ConnectionProvider . Driver is HanaDriverBase || Sfi . ConnectionProvider . Driver is SapSQLAnywhere17Driver )
200- Assert . Ignore ( "SAP HANA scope handling causes concurrency issues preventing chaining scope usages." ) ;
200+ Assert . Ignore ( "SAP HANA and SQL Anywhere scope handling causes concurrency issues preventing chaining scope usages." ) ;
201201
202202 using ( var s = WithOptions ( ) . ConnectionReleaseMode ( ConnectionReleaseMode . OnClose ) . OpenSession ( ) )
203203 {
@@ -265,6 +265,13 @@ public async Task CanUseSessionWithManyScopesAsync(bool explicitFlush)
265265 public async Task CanUseSessionOutsideOfScopeAfterScopeAsync ( bool explicitFlush )
266266 {
267267 IgnoreIfUnsupported ( explicitFlush ) ;
268+ // SAP SQL Anywhere .Net provider always causes system transactions to be distributed, causing them to
269+ // complete on concurrent threads. This creates race conditions when chaining session usage after a scope,
270+ // the subsequent usage finding the connection still enlisted in the previous transaction, its complete
271+ // being still not finished on its own thread.
272+ if ( Sfi . ConnectionProvider . Driver is SapSQLAnywhere17Driver )
273+ Assert . Ignore ( "SAP SQL Anywhere scope handling causes concurrency issues preventing chaining session usages." ) ;
274+
268275 using ( var s = WithOptions ( ) . ConnectionReleaseMode ( ConnectionReleaseMode . OnClose ) . OpenSession ( ) )
269276 {
270277 using ( var tx = new TransactionScope ( TransactionScopeAsyncFlowOption . Enabled ) )
0 commit comments