Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11392 closed (fixed)

Spurious failures in test suite due to result set ordering

Reported by: nauch Owned by: nobody
Component: Testing framework Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (1)

result_set_ordering.diff (3.6 KB) - added by nauch 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by nauch

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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.

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 5 years ago 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.

comment:4 Changed 5 years ago 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.

comment:5 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.