Skip to content

Commit 127a3da

Browse files
fixup! Support evaluation of Random.Next and NextDouble on db side
Fix again a test error causing 10% of runs to fail, but for MinMax variant.
1 parent cc2ee4f commit 127a3da

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public async Task CanQueryByRandomIntWithMinMaxAsync()
371371
// done next to the conditional operator. Having the cast only on one side is enough for avoiding
372372
// Firebird complain, so moving the constants on the left side have been put before the order id, in
373373
// order for these constants to be casted by the driver.
374-
var x = await (db.Orders.CountAsync(o => -idMin + o.OrderId < random.Next(1, 11)));
374+
var x = await (db.Orders.CountAsync(o => -idMin + o.OrderId < random.Next(1, 10)));
375375

376376
Assert.That(x, Is.GreaterThan(0).And.LessThan(10));
377377
// Next requires support of both floor and rand

src/NHibernate.Test/Linq/PreEvaluationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public void CanQueryByRandomIntWithMinMax()
359359
// done next to the conditional operator. Having the cast only on one side is enough for avoiding
360360
// Firebird complain, so moving the constants on the left side have been put before the order id, in
361361
// order for these constants to be casted by the driver.
362-
var x = db.Orders.Count(o => -idMin + o.OrderId < random.Next(1, 11));
362+
var x = db.Orders.Count(o => -idMin + o.OrderId < random.Next(1, 10));
363363

364364
Assert.That(x, Is.GreaterThan(0).And.LessThan(10));
365365
// Next requires support of both floor and rand

0 commit comments

Comments
 (0)