@@ -192,12 +192,12 @@ public async Task CanUseSessionWithManyScopesAsync(bool explicitFlush)
192
192
// being concurrently disposed of. See https://github.com/nhibernate/nhibernate-core/pull/1505 for more details.
193
193
if ( Sfi . ConnectionProvider . Driver is OdbcDriver )
194
194
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
196
196
// complete on concurrent threads. This creates race conditions when chaining scopes, the subsequent scope usage
197
197
// finding the connection still enlisted in the previous transaction, its complete being still not finished
198
198
// on its own thread.
199
199
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." ) ;
201
201
202
202
using ( var s = WithOptions ( ) . ConnectionReleaseMode ( ConnectionReleaseMode . OnClose ) . OpenSession ( ) )
203
203
{
@@ -265,6 +265,13 @@ public async Task CanUseSessionWithManyScopesAsync(bool explicitFlush)
265
265
public async Task CanUseSessionOutsideOfScopeAfterScopeAsync ( bool explicitFlush )
266
266
{
267
267
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
+
268
275
using ( var s = WithOptions ( ) . ConnectionReleaseMode ( ConnectionReleaseMode . OnClose ) . OpenSession ( ) )
269
276
{
270
277
using ( var tx = new TransactionScope ( TransactionScopeAsyncFlowOption . Enabled ) )
0 commit comments