File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed
src/NHibernate.Test/Async/Linq Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -291,41 +291,5 @@ public async Task PlansWithNonParameterizedConstantsAreNotCachedForExpandedQuery
291
291
Has . Count . EqualTo ( 0 ) ,
292
292
"Query plan should not be cached." ) ;
293
293
}
294
-
295
- //GH-2298 - Different Update queries - same query cache plan
296
- [ Test ]
297
- public async Task DmlPlansForExpandedQueryAsync ( )
298
- {
299
- var queryPlanCacheType = typeof ( QueryPlanCache ) ;
300
-
301
- var cache = ( SoftLimitMRUCache )
302
- queryPlanCacheType
303
- . GetField ( "planCache" , BindingFlags . Instance | BindingFlags . NonPublic )
304
- . GetValue ( Sfi . QueryPlanCache ) ;
305
- cache . Clear ( ) ;
306
-
307
- using ( session . BeginTransaction ( ) )
308
- {
309
- var list = new [ ] { "UNKNOWN" , "UNKNOWN2" } . ToList ( ) ;
310
- await ( db . Customers . Where ( x => list . Contains ( x . CustomerId ) ) . UpdateAsync (
311
- x => new Customer
312
- {
313
- CompanyName = "Constant1"
314
- } ) ) ;
315
-
316
- await ( db . Customers . Where ( x => list . Contains ( x . CustomerId ) )
317
- . UpdateAsync (
318
- x => new Customer
319
- {
320
- ContactName = "Constant1"
321
- } ) ) ;
322
-
323
- Assert . That (
324
- cache . Count ,
325
- //2 original queries + 2 expanded queries are expected in cache
326
- Is . EqualTo ( 0 ) . Or . EqualTo ( 4 ) ,
327
- "Query plans should either be cached separately or not cached at all." ) ;
328
- }
329
- }
330
294
}
331
295
}
You can’t perform that action at this time.
0 commit comments