File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 13
13
using NUnit . Framework ;
14
14
using NUnit . Framework . Interfaces ;
15
15
using System . Text ;
16
+ using NHibernate . Dialect ;
16
17
using NHibernate . Driver ;
18
+ using Oracle . ManagedDataAccess . Client ;
17
19
18
20
namespace NHibernate . Test
19
21
{
@@ -313,6 +315,15 @@ protected virtual DebugSessionFactory BuildSessionFactory()
313
315
private void Cleanup ( )
314
316
{
315
317
Sfi ? . Close ( ) ;
318
+
319
+ // Clear connection pool for Oracle to avoid problem that was manifested with https://github.com/nhibernate/nhibernate-core/pull/1517:
320
+ // As it seems Oracle can cache returned types for query for given connection.
321
+ // So exception can be thrown if two tests execute same query but with different types in result (like for Entity.Id int and Entity.Id Guid)
322
+ if ( Dialect is Oracle8iDialect )
323
+ {
324
+ OracleConnection . ClearAllPools ( ) ;
325
+ }
326
+
316
327
_sessionFactory = null ;
317
328
cfg = null ;
318
329
}
You can’t perform that action at this time.
0 commit comments