Skip to content

Commit

Permalink
Generate async files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 14, 2024
1 parent 541fefb commit a765abb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/NHibernate.Test/Async/Ado/BatcherFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory)
#if NET6_0_OR_GREATER
if (_useDbBatch)
{
return factory.Settings.BatcherFactory is DbBatchBatcherFactory;
return factory.Settings.BatcherFactory is DbBatchBatcherFactory && factory.Settings.ConnectionProvider.Driver is Driver.DriverBase driverBase && driverBase.CanCreateBatch;
}
#endif
return !(factory.Settings.BatcherFactory is NonBatchingBatcherFactory);
Expand Down Expand Up @@ -122,13 +122,18 @@ public async Task OneRoundTripUpdateAsync()
await (CleanupAsync());
}

[Test, NetFxOnly]
[Test]
[Description("SqlClient: The batcher log output should be formatted")]
public async Task BatchedoutputShouldBeFormattedAsync()
{
#if NETFX
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
#elif NET6_0_OR_GREATER
if (Sfi.Settings.BatcherFactory is DbBatchBatcherFactory == false)
Assert.Ignore("This test is for DbBatchBatcherFactory only");
#else
Assert.Ignore("This test is for NETFX and NET6_0_OR_GREATER only");
#endif

using (var sqlLog = new SqlLogSpy())
Expand Down
1 change: 0 additions & 1 deletion src/NHibernate/Async/AdoNet/AbstractBatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
using NHibernate.SqlTypes;
using NHibernate.Util;
using NHibernate.AdoNet.Util;
using System.Linq;

namespace NHibernate.AdoNet
{
Expand Down

0 comments on commit a765abb

Please sign in to comment.