Skip to content

Commit fcc79c2

Browse files
committed
Fix firebird tests
1 parent e7a15b4 commit fcc79c2

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
@@ -293,11 +293,10 @@ protected virtual void CreateSchema()
293293

294294
protected virtual void DropSchema()
295295
{
296-
using (var optionalConnection = OpenConnectionForSchemaExport())
297-
DropSchema(OutputDdl, SchemaExport, Sfi, optionalConnection);
296+
DropSchema(OutputDdl, SchemaExport, Sfi, OpenConnectionForSchemaExport);
298297
}
299298

300-
public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFactoryImplementor sfi, DbConnection optionalConnection = null)
299+
public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFactoryImplementor sfi, Func<DbConnection> getConnection = null)
301300
{
302301
if (sfi?.ConnectionProvider.Driver is FirebirdClientDriver fbDriver)
303302
{
@@ -310,7 +309,8 @@ public static void DropSchema(bool useStdOut, SchemaExport export, ISessionFacto
310309
fbDriver.ClearPool(null);
311310
}
312311

313-
export.Drop(useStdOut, true, optionalConnection);
312+
using(var optionalConnection = getConnection?.Invoke())
313+
export.Drop(useStdOut, true, optionalConnection);
314314
}
315315

316316
/// <summary>

0 commit comments

Comments
 (0)