Opened 4 years ago
Closed 4 years ago
#32168 closed Cleanup/optimization (fixed)
Remove serial pk assumptions in aggregation_regress tests
Reported by: | Tim Graham | Owned by: | Christopher Wang |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
CockroachDB doesn't use serial pks and some tests fail. Feel free to mention me on your pull request if you cannot test your changes on CockroachDB.
====================================================================== FAIL: test_more_more (aggregation_regress.tests.AggregationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/tests/aggregation_regress/tests.py", line 702, in test_more_more self.assertSequenceEqual( AssertionError: Sequences differ: <QuerySet [{'pub': 604193433639452673, 'i[145 chars] 1}]> != [{'pub': 604193433675366401, 'id__count':[134 chars]: 1}] First differing element 0: {'pub': 604193433639452673, 'id__count': 2} {'pub': 604193433675366401, 'id__count': 2} - <QuerySet [{'pub': 604193433639452673, 'id__count': 2}, {'pub': 604193433646432257, 'id__count': 1}, {'pub': 604193433652854785, 'id__count': 2}, {'pub': 604193433659506689, 'id__count': 1}]> + [{'id__count': 2, 'pub': 604193433675366401}, + {'id__count': 1, 'pub': 604193433690800129}, + {'id__count': 2, 'pub': 604193433704824833}, + {'id__count': 1, 'pub': 604193433718816769}] ====================================================================== FAIL: test_more_more_more (aggregation_regress.tests.AggregationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/tests/aggregation_regress/tests.py", line 880, in test_more_more_more self.assertEqual( AssertionError: Lists differ: [] != ['Apress', 'Sams'] Second list contains 2 additional elements. First extra element 0: 'Apress' - [] + ['Apress', 'Sams'] ====================================================================== FAIL: test_ticket_11293 (aggregation_regress.tests.AggregationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/tests/aggregation_regress/tests.py", line 1452, in test_ticket_11293 self.assertQuerysetEqual( File "/home/tim/code/django/django/test/testcases.py", line 1053, in assertQuerysetEqual return self.assertEqual(list(items), values, msg=msg) AssertionError: Lists differ: [604193433675366401, 604193433718816769, 604193433732775937, 604193433807945729] != [1, 4, 5, 6] First differing element 0: 604193433675366401 1 - [604193433675366401, 604193433718816769, 604193433732775937, 604193433807945729] + [1, 4, 5, 6]
Change History (8)
comment:1 by , 4 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 4 comment:3 by , 4 years ago
Has patch: | set |
---|
follow-up: 5 comment:4 by , 4 years ago
Replying to christopherwang:
PR: https://github.com/django/django/pull/13639
@Tim Graham, should another patch be made for stable/3.1.x, or is this mainly for future development on django-cockroachdb?
Christopher, another patch is not necessary, also this doesn't qualify for a backport.
comment:5 by , 4 years ago
Replying to Mariusz Felisiak:
Replying to christopherwang:
PR: https://github.com/django/django/pull/13639
@Tim Graham, should another patch be made for stable/3.1.x, or is this mainly for future development on django-cockroachdb?
Christopher, another patch is not necessary, also this doesn't qualify for a backport.
Sounds good! Just wanted to make sure to follow through if more was necessary.
comment:6 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
PR: https://github.com/django/django/pull/13639
@Tim Graham, should another patch be made for stable/3.1.x, or is this mainly for future development on django-cockroachdb?