Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#13172 closed (invalid)

multiple_database test failure after changeset 12755

Reported by: Gabriel Hurley Owned by: Gabriel Hurley
Component: Database layer (models, ORM) Version: master
Severity: Keywords: multiple_database, test_subquery
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I'm getting a failure from the multiple_database.QueryTestCase.test_subquery unit test, line 669: self.assertRaises(ValueError, list, qs)

The QuerySet is evaluating to an empty list rather than raising a ValueError.

This test was added recently ([12755]) in response to #12717. The reporter notes "To trigger this, you need a "default" and an "other" database setup, and they both can't be sqlite".

Since I'm using sqlite for both databases I'm guessing that's why the test is failing for me, but the test ought to be modified so that it doesn't fail for an all sqlite multi-DB setup.

Sorry I don't have a patch immediately. It should be a quick fix, but I'm in the middle of something else.

Change History (5)

comment:1 Changed 7 years ago by Karen Tracey

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

I'm not seeing this failure either -- tried Windows and Ubuntu, sqlite/sqlite & postgres/sqlite db combos. I'm pretty sure the buildbots have both test dbs specified as sqlite.

comment:2 Changed 7 years ago by Gabriel Hurley

Owner: changed from nobody to Gabriel Hurley
Status: newassigned

Apparently #13171 and #13172 were both version-specific Python bugs. I've been running 2.6.1 on my laptop, and upgrading to the (just released) 2.6.5 made them go away. Marking this one as invalid.

Just in case anyone's curious, as best I can tell there was something masking the exception in len, but I have no idea what the actual bug was. Bizarre!

comment:3 Changed 7 years ago by Gabriel Hurley

Resolution: invalid
Status: assignedclosed

comment:4 in reply to:  2 Changed 7 years ago by Karen Tracey

Replying to gabrielhurley:

Just in case anyone's curious, as best I can tell there was something masking the exception in len, but I have no idea what the actual bug was. Bizarre!

That sounds familiar -- I'd guess it is due to this Python bug. We had another test that failed because of this on beta versions of Python 2.6 -- see #7786. (Workaround was to not run that test on Python 2.6.)

comment:5 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top