diff --git a/build-common/teamcity-hibernate.cfg.xml b/build-common/teamcity-hibernate.cfg.xml
index 0e038aa76ea..e8cb7f7e6dd 100644
--- a/build-common/teamcity-hibernate.cfg.xml
+++ b/build-common/teamcity-hibernate.cfg.xml
@@ -24,5 +24,7 @@
false
+
+
diff --git a/default.build b/default.build
index 7f83ab2a508..cfee357e231 100644
--- a/default.build
+++ b/default.build
@@ -133,6 +133,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/teamcity/firebird/firebird_installation.txt b/lib/teamcity/firebird/firebird_installation.txt
index 48b85d2894d..2466b196bf8 100644
--- a/lib/teamcity/firebird/firebird_installation.txt
+++ b/lib/teamcity/firebird/firebird_installation.txt
@@ -23,9 +23,10 @@ UserManager = Srp
WireCrypt = Enabled
11. Restart Firebird service.
-For manual testing, take care of not creating it with inadequate acl on the file. This may happen
-if you use ISQL with a connection string causing it to create it in embedded mode, without actually
-using the server. Prefixing your path with "localhost:" should avoid that.
+For manual testing, take care of not creating the NHibernate database with inadequate acl on the file.
+This may happen if you use ISQL with a connection string causing it to create it in embedded mode,
+without actually using the server. Prefixing your path with "localhost:" should avoid that.
+Due to test constraints, make sure you create the database with a 16384 page size.
For tests performances, and since it is just an expandable test database, better disable forced writes.
Since those tests drop/create schema constantly, they are quite heavy on writes and this single setting
@@ -35,4 +36,6 @@ b. From Firebird installation folder, run:
gfix -w async nhibernate -user SYSDBA
(Change "nhibernate" to your own alias or path as appropriate for your setup)
c. Restart Firebird service.
-Note that the TestDatabaseSetup will drop and recreate the database when run, with forced writes disabled.
\ No newline at end of file
+Note that the TestDatabaseSetup will drop and recreate the database when run, with forced writes disabled
+and with a 16384 page size. So you may consider running the TestDatabaseSetup test instead for creating the
+NHibernate database.
diff --git a/lib/teamcity/oracle/oracle_installation.txt b/lib/teamcity/oracle/oracle_installation.txt
index 14b5b4fd904..a2f2aa8dda5 100644
--- a/lib/teamcity/oracle/oracle_installation.txt
+++ b/lib/teamcity/oracle/oracle_installation.txt
@@ -7,8 +7,9 @@ Installation steps for Oracle for NH TeamCity:
2. Run the installer ...
3. Choose any HTTP port for the listener if asked (it may automatically choose the default 8080 if available);
-4. Choose the ASCII character set. You will have to ensure nhibernate.oracle.use_n_prefixed_types_for_unicode
- parameter is set to true; Choosing instead the Unicode character set will cause some NHibernate tests to fail.
+4. Choose the ASCII character set. You will have to ensure oracle.use_n_prefixed_types_for_unicode
+ parameter is set to true and that query.default_cast_length is set to 2000. Choosing instead the Unicode
+ character set will cause some NHibernate tests to fail.
5. Enter 'password' as the password for the SYS and SYSTEM accounts;
6. The setup should install Oracle on the machine.
diff --git a/src/NHibernate.Config.Templates/FireBird.cfg.xml b/src/NHibernate.Config.Templates/FireBird.cfg.xml
index d621978174f..9e3c8e42992 100644
--- a/src/NHibernate.Config.Templates/FireBird.cfg.xml
+++ b/src/NHibernate.Config.Templates/FireBird.cfg.xml
@@ -22,6 +22,7 @@ for your own use before compile tests in VisualStudio.
Database=nhibernate;
User ID=SYSDBA;Password=masterkey;
MaxPoolSize=200;
+ charset=utf8;
false
NHibernate.Dialect.FirebirdDialect
diff --git a/src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml b/src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml
index 24b71f31b21..efa6b51a596 100644
--- a/src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml
+++ b/src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml
@@ -14,5 +14,12 @@ for your own use before compile tests in VisualStudio.
false
NHibernate.Dialect.Oracle10gDialect
true 1, false 0, yes 'Y', no 'N'
+
+ false
+
+
diff --git a/src/NHibernate.Config.Templates/Oracle.cfg.xml b/src/NHibernate.Config.Templates/Oracle.cfg.xml
index 523090cbc48..790f06f9c9f 100644
--- a/src/NHibernate.Config.Templates/Oracle.cfg.xml
+++ b/src/NHibernate.Config.Templates/Oracle.cfg.xml
@@ -14,5 +14,12 @@ for your own use before compile tests in VisualStudio.
false
NHibernate.Dialect.OracleDialect
true 1, false 0, yes 'Y', no 'N'
+
+ false
+
+
\ No newline at end of file
diff --git a/src/NHibernate.Test/Async/TypesTest/StringTypeFixture.cs b/src/NHibernate.Test/Async/TypesTest/StringTypeFixture.cs
index e86d6d3c37c..af851f3b3f3 100644
--- a/src/NHibernate.Test/Async/TypesTest/StringTypeFixture.cs
+++ b/src/NHibernate.Test/Async/TypesTest/StringTypeFixture.cs
@@ -8,15 +8,13 @@
//------------------------------------------------------------------------------
-using System;
+using System.Linq;
using NUnit.Framework;
+using NHibernate.Linq;
namespace NHibernate.Test.TypesTest
{
using System.Threading.Tasks;
- ///
- /// Summary description for StringTypeFixture.
- ///
[TestFixture]
public class StringTypeFixtureAsync : TypeFixtureBase
{
@@ -25,6 +23,14 @@ protected override string TypeName
get { return "String"; }
}
+ protected override void OnTearDown()
+ {
+ using (var s = OpenSession())
+ {
+ s.CreateQuery("delete from StringClass").ExecuteUpdate();
+ }
+ }
+
[Test]
public async Task InsertNullValueAsync()
{
@@ -38,12 +44,27 @@ public async Task InsertNullValueAsync()
using (ISession s = OpenSession())
{
- StringClass b = (StringClass) await (s.CreateCriteria(
- typeof(StringClass)).UniqueResultAsync());
- Assert.IsNull(b.StringValue);
- await (s.DeleteAsync(b));
+ StringClass b = (StringClass) await (s.CreateCriteria(typeof(StringClass)).UniqueResultAsync());
+ Assert.That(b.StringValue, Is.Null);
+ }
+ }
+
+ [Test]
+ public async Task InsertUnicodeValueAsync()
+ {
+ const string unicode = "길동 최고 新闻 地图 ます プル éèêëîïôöõàâäåãçùûü бджзй αβ ខគឃ ضذخ";
+ using (var s = OpenSession())
+ {
+ var b = new StringClass { StringValue = unicode };
+ await (s.SaveAsync(b));
await (s.FlushAsync());
}
+
+ using (var s = OpenSession())
+ {
+ var b = await (s.Query().SingleAsync());
+ Assert.That(b.StringValue, Is.EqualTo(unicode));
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/src/NHibernate.Test/TypesTest/StringTypeFixture.cs b/src/NHibernate.Test/TypesTest/StringTypeFixture.cs
index 55226b3c575..e1a8c8768b9 100644
--- a/src/NHibernate.Test/TypesTest/StringTypeFixture.cs
+++ b/src/NHibernate.Test/TypesTest/StringTypeFixture.cs
@@ -1,11 +1,8 @@
-using System;
+using System.Linq;
using NUnit.Framework;
namespace NHibernate.Test.TypesTest
{
- ///
- /// Summary description for StringTypeFixture.
- ///
[TestFixture]
public class StringTypeFixture : TypeFixtureBase
{
@@ -14,6 +11,14 @@ protected override string TypeName
get { return "String"; }
}
+ protected override void OnTearDown()
+ {
+ using (var s = OpenSession())
+ {
+ s.CreateQuery("delete from StringClass").ExecuteUpdate();
+ }
+ }
+
[Test]
public void InsertNullValue()
{
@@ -27,12 +32,27 @@ public void InsertNullValue()
using (ISession s = OpenSession())
{
- StringClass b = (StringClass) s.CreateCriteria(
- typeof(StringClass)).UniqueResult();
- Assert.IsNull(b.StringValue);
- s.Delete(b);
+ StringClass b = (StringClass) s.CreateCriteria(typeof(StringClass)).UniqueResult();
+ Assert.That(b.StringValue, Is.Null);
+ }
+ }
+
+ [Test]
+ public void InsertUnicodeValue()
+ {
+ const string unicode = "길동 최고 新闻 地图 ます プル éèêëîïôöõàâäåãçùûü бджзй αβ ខគឃ ضذخ";
+ using (var s = OpenSession())
+ {
+ var b = new StringClass { StringValue = unicode };
+ s.Save(b);
s.Flush();
}
+
+ using (var s = OpenSession())
+ {
+ var b = s.Query().Single();
+ Assert.That(b.StringValue, Is.EqualTo(unicode));
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs b/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs
index bc9c9a417fa..35d5a35e0d0 100644
--- a/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs
+++ b/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs
@@ -112,7 +112,10 @@ private static void SetupFirebird(Cfg.Configuration cfg)
{
Console.WriteLine(e);
}
- FbConnection.CreateDatabase(connStr, forcedWrites:false);
+ // With UTF8 charset, string takes up to four times as many space, causing the
+ // default page-size of 4096 to no more be enough for index key sizes. (Index key
+ // size is limited to a quarter of the page size.)
+ FbConnection.CreateDatabase(connStr, pageSize:16384, forcedWrites:false);
}
private static void SetupSqlServerCe(Cfg.Configuration cfg)
diff --git a/teamcity.build b/teamcity.build
index f3183f7159d..453780e8de2 100644
--- a/teamcity.build
+++ b/teamcity.build
@@ -76,14 +76,14 @@
-
+
-
+
@@ -127,6 +127,9 @@
+
+
@@ -143,6 +146,9 @@
+
+
@@ -158,6 +164,9 @@
+
+
@@ -167,6 +176,9 @@
+
+