Skip to content

Commit cc05270

Browse files
committed
Add exclusions for database that don't support features of new tests.
1 parent bd753c2 commit cc05270

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/NHibernate.Test/Async/Linq/WhereSubqueryTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System;
1212
using System.Linq;
1313
using System.Linq.Expressions;
14+
using NHibernate.Dialect;
1415
using NHibernate.DomainModel.Northwind.Entities;
1516
using NHibernate.Linq;
1617
using NUnit.Framework;
@@ -468,6 +469,11 @@ where subquery.Any(x => x.OrderId == order.OrderId)
468469
[Test(Description = "GH2479")]
469470
public async Task OrdersWithSubquery11Async()
470471
{
472+
if (Dialect is MySQLDialect)
473+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
474+
if (Dialect is MsSqlCeDialect)
475+
Assert.Ignore("MS SQL CE does not support sorting on a subquery.");
476+
471477
var ordersQuery = db.Orders
472478
.OrderByDescending(x => x.OrderLines.Count).ThenBy(x => x.OrderId)
473479
.Take(2);

src/NHibernate.Test/Linq/WhereSubqueryTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Linq;
33
using System.Linq.Expressions;
4+
using NHibernate.Dialect;
45
using NHibernate.DomainModel.Northwind.Entities;
56
using NHibernate.Linq;
67
using NUnit.Framework;
@@ -513,6 +514,9 @@ where subquery.Any(x => x.OrderId == order.OrderId)
513514
[Test(Description = "GH2479")]
514515
public void OrdersWithSubquery9()
515516
{
517+
if (Dialect is MySQLDialect)
518+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
519+
516520
var ordersQuery = db.Orders
517521
.Where(x => x.Employee.EmployeeId > 5)
518522
.OrderBy(x => x.OrderId)
@@ -533,6 +537,9 @@ public void OrdersWithSubquery9()
533537
[Test(Description = "GH2479")]
534538
public void OrdersWithSubquery10()
535539
{
540+
if (Dialect is MySQLDialect)
541+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
542+
536543
var ordersQuery = db.Orders
537544
.Where(x => x.Employee.EmployeeId > 5)
538545
.OrderBy(x => x.OrderId)
@@ -554,6 +561,11 @@ public void OrdersWithSubquery10()
554561
[Test(Description = "GH2479")]
555562
public void OrdersWithSubquery11()
556563
{
564+
if (Dialect is MySQLDialect)
565+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
566+
if (Dialect is MsSqlCeDialect)
567+
Assert.Ignore("MS SQL CE does not support sorting on a subquery.");
568+
557569
var ordersQuery = db.Orders
558570
.OrderByDescending(x => x.OrderLines.Count).ThenBy(x => x.OrderId)
559571
.Take(2);

0 commit comments

Comments
 (0)