Skip to content

Commit fb27709

Browse files
committed
Fix firebird tests
1 parent 856fe74 commit fb27709

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NHibernate.Test/TestCase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,10 @@ protected virtual void CreateSchema()
289289

290290
protected virtual void DropSchema()
291291
{
292-
using (var optionalConnection = OpenConnectionForSchemaExport())
293-
DropSchema(OutputDdl, SchemaExport, Sfi, optionalConnection);
292+
DropSchema(OutputDdl, SchemaExport, Sfi, OpenConnectionForSchemaExport);
294293
}
295294

296-
public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFactoryImplementor sfi, DbConnection optionalConnection = null)
295+
public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFactoryImplementor sfi, Func<DbConnection> getConnection = null)
297296
{
298297
if (sfi?.ConnectionProvider.Driver is FirebirdClientDriver fbDriver)
299298
{
@@ -306,7 +305,8 @@ public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFacto
306305
fbDriver.ClearPool(null);
307306
}
308307

309-
export.Drop(useStdOut, true, optionalConnection);
308+
using(var optionalConnection = getConnection?.Invoke())
309+
export.Drop(useStdOut, true, optionalConnection);
310310
}
311311

312312
/// <summary>

0 commit comments

Comments
 (0)