Skip to content

Commit 8f65834

Browse files
authored
Merge pull request #1 from fredericDelaporte/hana
Adjust code according to review
2 parents 212d109 + 90055a4 commit 8f65834

File tree

78 files changed

+416
-559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+416
-559
lines changed

src/NHibernate.Config.Templates/HANA.cfg.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ for your own use before compile tests in VisualStudio.
77
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
88
<session-factory name="NHibernate.Test">
99
<property name="connection.driver_class">NHibernate.Driver.HanaDriver</property>
10+
<!-- Sap.Data.Hana does not support re-enlisting in the same transaction, wrecking many usages
11+
with NHibernate when both NHibernate and the connection performs auto-enlistment. -->
1012
<property name="connection.connection_string">
11-
Server=localhost:39015;UserID=nhibernate;Password=
13+
Server=localhost:39015;UserID=nhibernate;Password=;
14+
Enlist=false;
1215
</property>
1316
<property name="dialect">NHibernate.Dialect.HanaColumnStoreDialect</property>
1417
</session-factory>

src/NHibernate.Test/Ado/GenericBatchingBatcherFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected override bool AppliesTo(Dialect.Dialect dialect)
2929
return !(dialect is FirebirdDialect) &&
3030
!(dialect is Oracle8iDialect) &&
3131
!(dialect is MsSqlCeDialect) &&
32-
!(dialect is AbstractHanaDialect);
32+
!(dialect is HanaDialectBase);
3333
}
3434

3535
[Test]

src/NHibernate.Test/Async/Ado/GenericBatchingBatcherFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected override bool AppliesTo(Dialect.Dialect dialect)
4242
return !(dialect is FirebirdDialect) &&
4343
!(dialect is Oracle8iDialect) &&
4444
!(dialect is MsSqlCeDialect) &&
45-
!(dialect is AbstractHanaDialect);
45+
!(dialect is HanaDialectBase);
4646
}
4747

4848
[Test]

src/NHibernate.Test/Async/Criteria/Lambda/FunctionsIntegrationFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ namespace NHibernate.Test.Criteria.Lambda
1919
[TestFixture]
2020
public class FunctionsIntegrationFixtureAsync : TestCase
2121
{
22-
protected override bool AppliesTo(Dialect.Dialect dialect)
23-
{
24-
return TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator;
25-
}
26-
2722
protected override string MappingsAssembly => "NHibernate.Test";
2823

2924
protected override IList Mappings => new[] { "Criteria.Lambda.Mappings.hbm.xml" };

src/NHibernate.Test/Async/Criteria/Lambda/IntegrationFixture.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ namespace NHibernate.Test.Criteria.Lambda
2424
[TestFixture]
2525
public class IntegrationFixtureAsync : TestCase
2626
{
27-
protected override bool AppliesTo(Dialect.Dialect dialect)
28-
{
29-
return TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator;
30-
}
31-
3227
protected override string MappingsAssembly { get { return "NHibernate.Test"; } }
3328

3429
protected override IList Mappings
@@ -269,6 +264,9 @@ public async Task IsTypeAsync()
269264
[Test]
270265
public async Task OverrideEagerJoinAsync()
271266
{
267+
if (!TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator)
268+
Assert.Ignore("Support of empty inserts is required");
269+
272270
using (ISession s = OpenSession())
273271
using (ITransaction t = s.BeginTransaction())
274272
{

src/NHibernate.Test/Async/Criteria/Lambda/ProjectIntegrationFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ namespace NHibernate.Test.Criteria.Lambda
2020
[TestFixture]
2121
public class ProjectIntegrationFixtureAsync : TestCase
2222
{
23-
protected override bool AppliesTo(Dialect.Dialect dialect)
24-
{
25-
return TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator;
26-
}
27-
2823
protected override string MappingsAssembly
2924
{
3025
get { return "NHibernate.Test"; }

src/NHibernate.Test/Async/Criteria/Lambda/SimpleIntegrationFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ namespace NHibernate.Test.Criteria.Lambda
1717
[TestFixture]
1818
public class SimpleIntegrationFixtureAsync : TestCase
1919
{
20-
protected override bool AppliesTo(Dialect.Dialect dialect)
21-
{
22-
return TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator;
23-
}
24-
2520
protected override string MappingsAssembly
2621
{
2722
get { return "NHibernate.Test"; }

src/NHibernate.Test/Async/Criteria/Lambda/SubQueryIntegrationFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ namespace NHibernate.Test.Criteria.Lambda
1919
[TestFixture]
2020
public class SubQueryIntegrationFixtureAsync : TestCase
2121
{
22-
protected override bool AppliesTo(Dialect.Dialect dialect)
23-
{
24-
return TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator;
25-
}
26-
2722
protected override string MappingsAssembly
2823
{
2924
get { return "NHibernate.Test"; }

src/NHibernate.Test/Async/Generatedkeys/Seqidentity/SequenceIdentityFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected override string MappingsAssembly
2929

3030
protected override bool AppliesTo(Dialect.Dialect dialect)
3131
{
32-
return dialect.SupportsSequences && !(dialect is Dialect.MsSql2012Dialect) && !(dialect is Dialect.AbstractHanaDialect);
32+
return dialect.SupportsSequences && !(dialect is Dialect.MsSql2012Dialect) && !(dialect is Dialect.HanaDialectBase);
3333
}
3434

3535
[Test]

src/NHibernate.Test/Async/GenericTest/Overall/Fixture.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System;
1212
using System.Collections;
1313
using System.Collections.Generic;
14+
1415
using NUnit.Framework;
1516

1617
namespace NHibernate.Test.GenericTest.Overall
@@ -19,11 +20,6 @@ namespace NHibernate.Test.GenericTest.Overall
1920
[TestFixture]
2021
public class FixtureAsync : TestCase
2122
{
22-
protected override bool AppliesTo(Dialect.Dialect dialect)
23-
{
24-
return TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator;
25-
}
26-
2723
protected override IList Mappings
2824
{
2925
get { return new[] { "GenericTest.Overall.Mappings.hbm.xml" }; }
@@ -57,6 +53,9 @@ public async Task CRUDAsync()
5753
[Test]
5854
public async Task CRUDABAsync()
5955
{
56+
if (!TestDialect.SupportsEmptyInsertsOrHasNonIdentityNativeGenerator)
57+
Assert.Ignore("Support of empty inserts is required");
58+
6059
var entity = new A<B>
6160
{
6261
Property = new B { Prop = 2 },

0 commit comments

Comments
 (0)