Skip to content

Commit 97b3a55

Browse files
committed
PagingTests.cs: Ignore tests that rely on bounded subqueries on MySQL, since it doesn't support LIMIT on subqueries used within the IN-clause.
1 parent f7c8646 commit 97b3a55

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/NHibernate.Test/Linq/PagingTests.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Linq;
22
using NHibernate.Cfg;
3+
using NHibernate.Dialect;
34
using NUnit.Framework;
45

56
namespace NHibernate.Test.Linq
@@ -366,6 +367,9 @@ public void DescendingOrderedPagedProductsWithInnerProjection()
366367
[Test]
367368
public void PagedProductsWithOuterWhereClause()
368369
{
370+
if (Dialect is MySQLDialect)
371+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
372+
369373
//NH-2588
370374
var inMemoryIds = db.Products.ToList()
371375
.OrderByDescending(x => x.ProductId)
@@ -385,6 +389,9 @@ public void PagedProductsWithOuterWhereClause()
385389
[Test]
386390
public void PagedProductsWithOuterWhereClauseResort()
387391
{
392+
if (Dialect is MySQLDialect)
393+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
394+
388395
//NH-2588
389396
var inMemoryIds = db.Products.ToList()
390397
.OrderByDescending(x => x.ProductId)
@@ -406,6 +413,9 @@ public void PagedProductsWithOuterWhereClauseResort()
406413
[Test]
407414
public void PagedProductsWithInnerAndOuterWhereClauses()
408415
{
416+
if (Dialect is MySQLDialect)
417+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
418+
409419
//NH-2588
410420
var inMemoryIds = db.Products.ToList()
411421
.Where(x => x.UnitsInStock < 100)
@@ -429,6 +439,9 @@ public void PagedProductsWithInnerAndOuterWhereClauses()
429439
[Test]
430440
public void PagedProductsWithOuterWhereClauseEquivalent()
431441
{
442+
if (Dialect is MySQLDialect)
443+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
444+
432445
//NH-2588
433446
var inMemoryIds = db.Products.ToList()
434447
.OrderByDescending(x => x.ProductId)
@@ -452,6 +465,9 @@ public void PagedProductsWithOuterWhereClauseEquivalent()
452465
[Test]
453466
public void PagedProductsWithOuterWhereClauseAndProjection()
454467
{
468+
if (Dialect is MySQLDialect)
469+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
470+
455471
//NH-2588
456472
var inMemoryIds = db.Products.ToList()
457473
.OrderByDescending(x => x.ProductId)
@@ -473,6 +489,9 @@ public void PagedProductsWithOuterWhereClauseAndProjection()
473489
[Test]
474490
public void PagedProductsWithOuterWhereClauseAndComplexProjection()
475491
{
492+
if (Dialect is MySQLDialect)
493+
Assert.Ignore("MySQL does not support LIMIT in subqueries.");
494+
476495
//NH-2588
477496
var inMemoryIds = db.Products.ToList()
478497
.OrderByDescending(x => x.ProductId)

0 commit comments

Comments
 (0)