Skip to content

Commit a765abb

Browse files
Generate async files
1 parent 541fefb commit a765abb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: src/NHibernate.Test/Async/Ado/BatcherFixture.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory)
5656
#if NET6_0_OR_GREATER
5757
if (_useDbBatch)
5858
{
59-
return factory.Settings.BatcherFactory is DbBatchBatcherFactory;
59+
return factory.Settings.BatcherFactory is DbBatchBatcherFactory && factory.Settings.ConnectionProvider.Driver is Driver.DriverBase driverBase && driverBase.CanCreateBatch;
6060
}
6161
#endif
6262
return !(factory.Settings.BatcherFactory is NonBatchingBatcherFactory);
@@ -122,13 +122,18 @@ public async Task OneRoundTripUpdateAsync()
122122
await (CleanupAsync());
123123
}
124124

125-
[Test, NetFxOnly]
125+
[Test]
126126
[Description("SqlClient: The batcher log output should be formatted")]
127127
public async Task BatchedoutputShouldBeFormattedAsync()
128128
{
129129
#if NETFX
130130
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
131131
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
132+
#elif NET6_0_OR_GREATER
133+
if (Sfi.Settings.BatcherFactory is DbBatchBatcherFactory == false)
134+
Assert.Ignore("This test is for DbBatchBatcherFactory only");
135+
#else
136+
Assert.Ignore("This test is for NETFX and NET6_0_OR_GREATER only");
132137
#endif
133138

134139
using (var sqlLog = new SqlLogSpy())

Diff for: src/NHibernate/Async/AdoNet/AbstractBatcher.cs

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using NHibernate.SqlTypes;
2323
using NHibernate.Util;
2424
using NHibernate.AdoNet.Util;
25-
using System.Linq;
2625

2726
namespace NHibernate.AdoNet
2827
{

0 commit comments

Comments
 (0)