diff --git a/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs b/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs
index a3e191f6d2d..878a45e1a41 100644
--- a/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs
+++ b/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs
@@ -15,6 +15,7 @@
using NHibernate.Cache;
using NHibernate.Cfg;
using NHibernate.Linq;
+using NHibernate.Loader;
using NHibernate.Multi;
using NHibernate.Test.CacheTest.Caches;
using NUnit.Framework;
@@ -24,9 +25,17 @@ namespace NHibernate.Test.CacheTest
{
using System.Threading.Tasks;
using System.Threading;
- [TestFixture]
+ [TestFixture(BatchFetchStyle.Dynamic)]
+ [TestFixture(BatchFetchStyle.Legacy)]
public class BatchableCacheFixtureAsync : TestCase
{
+ private readonly BatchFetchStyle _fetchStyle;
+
+ public BatchableCacheFixtureAsync(BatchFetchStyle fetchStyle)
+ {
+ _fetchStyle = fetchStyle;
+ }
+
protected override string[] Mappings => new[]
{
"CacheTest.ReadOnly.hbm.xml",
@@ -43,6 +52,7 @@ protected override void Configure(Configuration configuration)
configuration.SetProperty(Environment.UseQueryCache, "true");
configuration.SetProperty(Environment.GenerateStatistics, "true");
configuration.SetProperty(Environment.CacheProvider, typeof(BatchableCacheProvider).AssemblyQualifiedName);
+ configuration.SetProperty(Environment.BatchFetchStyle, _fetchStyle.ToString());
}
protected override void OnSetUp()
diff --git a/src/NHibernate.Test/Async/CacheTest/BatchableCacheSubclassFixture.cs b/src/NHibernate.Test/Async/CacheTest/BatchableCacheSubclassFixture.cs
index 7ac6d663aee..1bbfbda902b 100644
--- a/src/NHibernate.Test/Async/CacheTest/BatchableCacheSubclassFixture.cs
+++ b/src/NHibernate.Test/Async/CacheTest/BatchableCacheSubclassFixture.cs
@@ -15,15 +15,24 @@
using NHibernate.Cache;
using NHibernate.Cfg;
using NHibernate.DomainModel;
+using NHibernate.Loader;
using NHibernate.Test.CacheTest.Caches;
using NUnit.Framework;
namespace NHibernate.Test.CacheTest
{
using System.Threading.Tasks;
- [TestFixture]
+ [TestFixture(BatchFetchStyle.Dynamic)]
+ [TestFixture(BatchFetchStyle.Legacy)]
public class BatchableCacheSubclassFixtureAsync : TestCase
{
+ private readonly BatchFetchStyle _fetchStyle;
+
+ public BatchableCacheSubclassFixtureAsync(BatchFetchStyle fetchStyle)
+ {
+ _fetchStyle = fetchStyle;
+ }
+
protected override string[] Mappings
{
get
@@ -56,6 +65,7 @@ protected override void Configure(Configuration configuration)
configuration.SetProperty(Cfg.Environment.UseSecondLevelCache, "true");
configuration.SetProperty(Cfg.Environment.UseQueryCache, "true");
configuration.SetProperty(Cfg.Environment.CacheProvider, typeof(BatchableCacheProvider).AssemblyQualifiedName);
+ configuration.SetProperty(Cfg.Environment.BatchFetchStyle, _fetchStyle.ToString());
}
protected override void OnSetUp()
diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs
index 7d0e2aa0c2f..386428efd12 100644
--- a/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs
+++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3142/ChildrenTest.cs
@@ -11,15 +11,31 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using NHibernate.Cfg;
using NHibernate.Driver;
+using NHibernate.Loader;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH3142
{
using System.Threading.Tasks;
- [TestFixture]
+ [TestFixture(BatchFetchStyle.Dynamic)]
+ [TestFixture(BatchFetchStyle.Legacy)]
public class ChildrenTestAsync : BugTestCase
{
+ private readonly BatchFetchStyle _fetchStyle;
+
+ public ChildrenTestAsync(BatchFetchStyle fetchStyle)
+ {
+ _fetchStyle = fetchStyle;
+ }
+
+ protected override void Configure(Configuration configuration)
+ {
+ base.Configure(configuration);
+ configuration.SetProperty(Cfg.Environment.BatchFetchStyle, _fetchStyle.ToString());
+ }
+
protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory)
{
return !(factory.ConnectionProvider.Driver is OracleManagedDataClientDriver);
diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs
new file mode 100644
index 00000000000..be33442597b
--- /dev/null
+++ b/src/NHibernate.Test/Async/NHSpecificTest/NH3530/BatchFetchStyleFixture.cs
@@ -0,0 +1,201 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by AsyncGenerator.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using NHibernate.Cfg;
+using NHibernate.Cfg.MappingSchema;
+using NHibernate.Loader;
+using NUnit.Framework;
+using Environment = NHibernate.Cfg.Environment;
+
+namespace NHibernate.Test.NHSpecificTest.NH3530
+{
+ using System.Threading.Tasks;
+ using System.Threading;
+ //NH-3530 (GH-1316)
+ [TestFixture(BatchFetchStyle.Dynamic)]
+ [TestFixture(BatchFetchStyle.Legacy)]
+ public class BatchFetchStyleFixtureAsync : TestCaseMappingByCode
+ {
+ private readonly BatchFetchStyle _fetchStyle;
+ private readonly List