File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Tools/hbm2ddl/SchemaMetadataUpdaterTest Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 3
3
using System . Runtime . Serialization . Formatters . Binary ;
4
4
using NHibernate . Cfg ;
5
5
using NHibernate . DomainModel ;
6
+ using NHibernate . Driver ;
7
+ using NHibernate . Engine ;
6
8
using NHibernate . Tool . hbm2ddl ;
7
9
using NUnit . Framework ;
8
10
@@ -82,6 +84,18 @@ public void Basic_CRUD_should_work()
82
84
var p = session . Get < Parent > ( parentId ) ;
83
85
Assert . That ( p , Is . Null ) ;
84
86
}
87
+
88
+ if ( ( ( ISessionFactoryImplementor ) sf ) . ConnectionProvider . Driver is FirebirdClientDriver fbDriver )
89
+ {
90
+ // Firebird will pool each connection created during the test and will marked as used any table
91
+ // referenced by queries. It will at best delays those tables drop until connections are actually
92
+ // closed, or immediately fail dropping them.
93
+ // This results in other tests failing when they try to create tables with same name.
94
+ // By clearing the connection pool the tables will get dropped. This is done by the following code.
95
+ // Moved from NH1908 test case, contributed by Amro El-Fakharany.
96
+ fbDriver . ClearPool ( null ) ;
97
+ }
98
+
85
99
export . Drop ( true , true ) ;
86
100
}
87
101
}
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ public void CanWorkWithAutoQuoteTableAndColumnsAtStratup()
248
248
t . Commit ( ) ;
249
249
}
250
250
251
- new SchemaExport ( configuration ) . Drop ( false , false ) ;
251
+ new SchemaExport ( configuration ) . Drop ( false , true ) ;
252
252
}
253
253
254
254
[ Test ]
You can’t perform that action at this time.
0 commit comments