Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #19112 -- Reduced the amount of query params in a test

  • Loading branch information...
commit 604d8763dc2c901a3557e15880895d88af5c4127 1 parent 5cc0f5f
Anssi Kääriäinen akaariai authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/regressiontests/queries/tests.py
6 tests/regressiontests/queries/tests.py
View
@@ -2169,8 +2169,10 @@ def test_null_ordering_added(self):
@skipUnlessDBFeature('supports_1000_query_parameters')
def test_ticket14244(self):
# Test that the "in" lookup works with lists of 1000 items or more.
+ # The numbers amount is picked to force three different IN batches
+ # for Oracle, yet to be less than 2100 parameter limit for MSSQL.
+ numbers = range(2050)
Number.objects.all().delete()
- numbers = range(2500)
Number.objects.bulk_create(Number(num=num) for num in numbers)
self.assertEqual(
Number.objects.filter(num__in=numbers[:1000]).count(),
@@ -2186,7 +2188,7 @@ def test_ticket14244(self):
)
self.assertEqual(
Number.objects.filter(num__in=numbers).count(),
- 2500
+ len(numbers)
)
Please sign in to comment.
Something went wrong with that request. Please try again.