Django

Code

Ticket #11392 (closed: fixed)

Opened 9 months ago

Last modified 9 months ago

Spurious failures in test suite due to result set ordering

Reported by: nauch Assigned to: nobody
Milestone: 1.1 Component: Testing framework
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

A number of tests in the test suite occasionally fail due to order differences in the result set. The attached patch addresses the ones I have seen so far.

Attachments

result_set_ordering.diff (3.6 kB) - added by nauch on 06/26/09 15:51:19.

Change History

06/26/09 15:51:19 changed by nauch

  • attachment result_set_ordering.diff added.

06/27/09 14:58:52 changed by Alex

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

The patch looks good, except for the last item. Django adds an ORDER BY clause to that query so I don't think the sorted operation is correct there. Also in the future please make diffs against the root of the source tree, instead of from inside the tests directory.

06/29/09 07:29:48 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(In [11119]) Fixed #11392 -- Enforced a predictable result order for a couple of test cases. Thanks to Nathan Auch for the report and patch.

06/29/09 07:33:43 changed by russellm

As noted by Alex, the aggregation_regress change isn't required. The query should be returning a list of Book objects, and Book has an implied ordering by name. If you're getting different results here, either your backend isn't applying the implied ordering, or we have a deeper problem with query construction that hasn't been revealed by other tests to date.

06/29/09 09:10:55 changed by russellm

(In [11121]) [1.0.X] Fixed #11392 -- Enforced a predictable result order for a couple of test cases. Thanks to Nathan Auch for the report and patch.

Merge of r11119 from trunk.


Add/Change #11392 (Spurious failures in test suite due to result set ordering)




Change Properties
Action