Skip to content

Commit 0ea0f08

Browse files
committed
Fix FB Tests
1 parent 4fa82e8 commit 0ea0f08

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ before_test:
2525
# Install Firebird
2626
New-Item -ItemType Directory -Force $FireBirdPath > $null
2727
Push-Location $FireBirdPath
28-
Invoke-WebRequest 'https://github.com/FirebirdSQL/firebird/releases/download/R3_0_5/Firebird-3.0.5.33220-0_x64.zip' -OutFile firebird.zip
28+
Invoke-WebRequest 'https://github.com/FirebirdSQL/firebird/releases/download/R3_0_7/Firebird-3.0.7.33374-1_x64.zip' -OutFile firebird.zip
2929
Unblock-File firebird.zip
3030
7z x firebird.zip
3131
New-Item -ItemType Directory -Force Data

src/NHibernate.Test/NHibernate.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<PackageReference Include="NUnit" Version="3.12.0" />
6464
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
6565
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
66-
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="6.3.0" />
66+
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="8.0.1" />
6767
<PackageReference Include="Npgsql" Version="4.0.3" />
6868
</ItemGroup>
6969
<ItemGroup Condition="$(NhNetFx)">

src/NHibernate.Test/TestCase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ protected virtual void DropSchema()
303303

304304
public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFactoryImplementor sfi, Func<DbConnection> getConnection = null)
305305
{
306+
using(var optionalConnection = getConnection?.Invoke())
307+
export.Drop(useStdOut, true, optionalConnection);
308+
306309
if (sfi?.ConnectionProvider.Driver is FirebirdClientDriver fbDriver)
307310
{
308311
// Firebird will pool each connection created during the test and will marked as used any table
@@ -313,9 +316,6 @@ public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFacto
313316
// Moved from NH1908 test case, contributed by Amro El-Fakharany.
314317
fbDriver.ClearPool(null);
315318
}
316-
317-
using(var optionalConnection = getConnection?.Invoke())
318-
export.Drop(useStdOut, true, optionalConnection);
319319
}
320320

321321
/// <summary>

src/NHibernate/Driver/FirebirdClientDriver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ public void ClearPool(string connectionString)
160160
using (var clearConnection = CreateConnection())
161161
{
162162
var connectionType = clearConnection.GetType();
163-
_clearPool = connectionType.GetMethod("ClearPool") ?? throw new InvalidOperationException("Unable to resolve ClearPool method.");
164-
_clearAllPools = connectionType.GetMethod("ClearAllPools") ?? throw new InvalidOperationException("Unable to resolve ClearAllPools method.");
163+
_clearPool = connectionType.GetMethod("ClearPool", new[] { connectionType }) ?? throw new InvalidOperationException("Unable to resolve ClearPool method.");
164+
_clearAllPools = connectionType.GetMethod("ClearAllPools", Array.Empty<System.Type>()) ?? throw new InvalidOperationException("Unable to resolve ClearAllPools method.");
165165
}
166166
}
167167

0 commit comments

Comments
 (0)