Skip to content

Commit 371fc87

Browse files
committed
Enable both cases
1 parent efdcbf5 commit 371fc87

File tree

1 file changed

+13
-5
lines changed
  • src/NHibernate.Test/NHSpecificTest/GH3290

1 file changed

+13
-5
lines changed

src/NHibernate.Test/NHSpecificTest/GH3290/Fixture.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77

88
namespace NHibernate.Test.NHSpecificTest.GH3290
99
{
10-
[TestFixture]
10+
[TestFixture(true)]
11+
[TestFixture(false)]
1112
public class Fixture : TestCaseMappingByCode
1213
{
14+
private readonly bool _detectFetchLoops;
15+
16+
public Fixture(bool detectFetchLoops)
17+
{
18+
_detectFetchLoops = detectFetchLoops;
19+
}
20+
1321
protected override HbmMapping GetMappings()
1422
{
1523
var mapper = new ModelMapper();
@@ -63,11 +71,11 @@ protected override HbmMapping GetMappings()
6371

6472
protected override void Configure(Configuration configuration)
6573
{
66-
// Workaround fo the test case:
67-
/*
74+
if (_detectFetchLoops)
75+
return;
76+
6877
configuration.SetProperty(Environment.DetectFetchLoops, "false");
6978
configuration.SetProperty(Environment.MaxFetchDepth, "2");
70-
*/
7179
}
7280

7381
protected override void OnSetUp()
@@ -99,7 +107,7 @@ protected override void OnTearDown()
99107
using var session = OpenSession();
100108
using var transaction = session.BeginTransaction();
101109

102-
session.CreateSQLQuery("delete EntityToEntity").ExecuteUpdate();
110+
session.CreateSQLQuery("delete from EntityToEntity").ExecuteUpdate();
103111
session.CreateQuery("delete from System.Object").ExecuteUpdate();
104112

105113
transaction.Commit();

0 commit comments

Comments
 (0)