Skip to content

Migrate appveyor build to MySql 8 #3450

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

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 @@ -42,10 +42,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;' --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
1 change: 1 addition & 0 deletions build-common/NHibernate.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<NhNetCoreApp>false</NhNetCoreApp>
<NhNetCoreApp Condition="$(TargetFramework.StartsWith('netcoreapp'))">true</NhNetCoreApp>
<DefineConstants Condition="$(NhNetCoreApp) AND $(NhVbNet) == ''" >NETCOREAPP2_0_OR_GREATER;$(DefineConstants)</DefineConstants>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can no more compile the 5.3.x branch without downgrading from errors these warnings back to warnings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested GHA build on my 5.3.x branch - it builds without any issues:
https://github.com/bahusoid/nhibernate-core/actions/runs/7003210288/job/19048468922


<Product>NHibernate</Product>
<Company>NHibernate.info</Company>
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
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
6 changes: 3 additions & 3 deletions src/NHibernate.Test/NHibernate.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
<PackageReference Include="Microsoft.SqlServer.Compact" Version="4.0.8876.1" />
<PackageReference Include="Oracle.ManagedDataAccess" Version="12.1.2400" />
<PackageReference Include="MySql.Data" Version="6.9.11" />
<PackageReference Include="MySql.Data" Version="8.0.30" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.0'">
<PackageReference Include="System.CodeDom" Version="4.4.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.2" />
<PackageReference Include="System.Data.OracleClient" Version="1.0.8" />
<PackageReference Include="System.Data.Odbc" Version="4.5.0" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="MySql.Data" Version="6.10.6" />
<PackageReference Include="MySql.Data" Version="8.0.30" />
<PackageReference Include="NUnitLite" Version="3.13.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.1'">
Expand All @@ -91,7 +91,7 @@
<PackageReference Include="System.Data.OracleClient" Version="1.0.8" />
<PackageReference Include="System.Data.Odbc" Version="4.5.0" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="MySql.Data" Version="6.10.6" />
<PackageReference Include="MySql.Data" Version="8.0.30" />
<PackageReference Include="NUnitLite" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
</ItemGroup>
Expand Down