Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate appveyor build to MySql 8 #3447

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ before_test:
Pop-Location
}
'MySQL' {
Start-Service 'MySQL57'
Start-Service 'MySQL80'
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)
$env:MYSQL_PWD = 'Password12!'
& 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
& 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
}
'Odbc' { Start-Service 'MSSQL$SQL2017' }
'PostgreSQL' {
Expand Down
8 changes: 7 additions & 1 deletion src/NHibernate.Test/Async/Linq/MethodCallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public async Task CanExecuteCountWithOrderByArgumentsAsync()
public async Task CanSelectPropertiesIntoObjectArrayAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Name, u.InvalidLoginAttempts})
.FirstAsync());

Expand All @@ -71,6 +72,7 @@ public async Task CanSelectPropertiesIntoObjectArrayAsync()
public async Task CanSelectComponentsIntoObjectArrayAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Component, u.Component.OtherComponent})
.FirstAsync());

Expand Down Expand Up @@ -106,6 +108,7 @@ public async Task CanSelectConstantsIntoObjectArrayAsync()
const string name = "Julian";

var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, pi, name, DateTime.MinValue})
.FirstAsync());

Expand All @@ -119,6 +122,7 @@ public async Task CanSelectConstantsIntoObjectArrayAsync()
public async Task CanSelectPropertiesFromAssociationsIntoObjectArrayAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Role.Name, u.Role.Entity.Output})
.FirstAsync());

Expand All @@ -131,6 +135,7 @@ public async Task CanSelectPropertiesFromAssociationsIntoObjectArrayAsync()
public async Task CanSelectPropertiesIntoObjectArrayInPropertyAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new object[] { u.Id, u.Name, new object[u.Id] } })
.FirstAsync());

Expand All @@ -144,6 +149,7 @@ public async Task CanSelectPropertiesIntoObjectArrayInPropertyAsync()
public async Task CanSelectPropertiesIntoPropertyListInPropertyAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new List<object> { u.Id, u.Name, new object[u.Id] } })
.FirstAsync());

Expand All @@ -156,7 +162,7 @@ public async Task CanSelectPropertiesIntoPropertyListInPropertyAsync()
[Test, Description("NH-2744")]
public async Task CanSelectPropertiesIntoNestedObjectArraysAsync()
{
var query = db.Users.Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var query = db.Users.OrderBy(u => u.Id).Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var result = await (query.FirstAsync());

Assert.That(result.Length, Is.EqualTo(2));
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Test/Extralazy/UserGroup.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
assembly="NHibernate.Test"
namespace="NHibernate.Test.Extralazy">

<class name="Group" table="groups">
<class name="Group" table="`groups`">
<id name="Name"/>
<map name="Users" cascade="persist" table="group_user" lazy="extra">
<key column="groupName"/>
Expand Down
8 changes: 7 additions & 1 deletion src/NHibernate.Test/Linq/MethodCallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void CanExecuteCountWithOrderByArguments()
public void CanSelectPropertiesIntoObjectArray()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Name, u.InvalidLoginAttempts})
.First();

Expand All @@ -59,6 +60,7 @@ public void CanSelectPropertiesIntoObjectArray()
public void CanSelectComponentsIntoObjectArray()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Component, u.Component.OtherComponent})
.First();

Expand Down Expand Up @@ -94,6 +96,7 @@ public void CanSelectConstantsIntoObjectArray()
const string name = "Julian";

var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, pi, name, DateTime.MinValue})
.First();

Expand All @@ -107,6 +110,7 @@ public void CanSelectConstantsIntoObjectArray()
public void CanSelectPropertiesFromAssociationsIntoObjectArray()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Role.Name, u.Role.Entity.Output})
.First();

Expand All @@ -119,6 +123,7 @@ public void CanSelectPropertiesFromAssociationsIntoObjectArray()
public void CanSelectPropertiesIntoObjectArrayInProperty()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new object[] { u.Id, u.Name, new object[u.Id] } })
.First();

Expand All @@ -132,6 +137,7 @@ public void CanSelectPropertiesIntoObjectArrayInProperty()
public void CanSelectPropertiesIntoPropertyListInProperty()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new List<object> { u.Id, u.Name, new object[u.Id] } })
.First();

Expand All @@ -144,7 +150,7 @@ public void CanSelectPropertiesIntoPropertyListInProperty()
[Test, Description("NH-2744")]
public void CanSelectPropertiesIntoNestedObjectArrays()
{
var query = db.Users.Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var query = db.Users.OrderBy(u => u.Id).Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var result = query.First();

Assert.That(result.Length, Is.EqualTo(2));
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHSpecificTest/NH2113/Mappings.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<property name="Name" />
</class>

<class name="Group" table="Groups">
<class name="Group" table="`Groups`">
<id name="Id" column="GroupID">
<generator class="increment"/>
</id>
Expand Down
4 changes: 2 additions & 2 deletions src/NHibernate.Test/NHSpecificTest/NH2907/Mappings.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<property name="Name" type="string"/>
</class>

<class name="Group" table="groups">
<class name="Group" table="`groups`">
<id name="Id">
<column name="GroupId"/>
<generator class="native"/>
</id>
<property name="Name" type="string"/>
</class>
</hibernate-mapping>
</hibernate-mapping>
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHibernate.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="9.1.1" />
<PackageReference Include="Npgsql" Version="7.0.4" />
<PackageReference Include="MySql.Data" Version="8.0.27" />
<PackageReference Include="MySql.Data" Version="8.0.30" />
</ItemGroup>
<ItemGroup Condition="$(NhNetFx)">
<Reference Include="System.Configuration" />
Expand Down
Loading