Skip to content

Commit

Permalink
Tweak slow-running test.
Browse files Browse the repository at this point in the history
This test was very slow against in-memory. Reduced the amount of data used without, hopefully, impacting the intent of the test. Results in 10 seconds faster total test run time on my machine.
  • Loading branch information
ajcvickers committed Apr 5, 2020
1 parent f6978f0 commit cc838a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ public virtual Task Multiple_collection_navigation_with_FirstOrDefault_chained(b
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Select(
c => c.Orders.OrderBy(o => o.OrderID).FirstOrDefault()
.Maybe(x => x.OrderDetails)
.Maybe(xx => xx.OrderBy(od => od.ProductID).FirstOrDefault())));
.Maybe(xx => xx.OrderBy(od => od.ProductID).FirstOrDefault())));
}

[ConditionalTheory]
Expand All @@ -938,10 +938,10 @@ public virtual Task Multiple_collection_navigation_with_FirstOrDefault_chained_p
{
return AssertQueryScalar(
async,
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Select(
ss => ss.Set<Customer>().Where(c => c.CustomerID.StartsWith("A")).OrderBy(c => c.CustomerID).Select(
c => (int?)c.Orders.OrderBy(o => o.OrderID).FirstOrDefault().OrderDetails.OrderBy(od => od.ProductID).FirstOrDefault()
.ProductID),
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Select(
ss => ss.Set<Customer>().Where(c => c.CustomerID.StartsWith("A")).OrderBy(c => c.CustomerID).Select(
c => c.Orders.OrderBy(o => o.OrderID).FirstOrDefault()
.Maybe(x => x.OrderDetails)
.MaybeScalar(x => x.OrderBy(od => od.ProductID).FirstOrDefault().ProductID)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ FROM [Orders] AS [o1]
ORDER BY [o1].[OrderID]) = [o].[OrderID])
ORDER BY [o].[ProductID])
FROM [Customers] AS [c]
WHERE [c].[CustomerID] LIKE N'A%'
ORDER BY [c].[CustomerID]");
}

Expand Down

0 comments on commit cc838a8

Please sign in to comment.