Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13172 closed (invalid)

multiple_database test failure after changeset 12755

Reported by: gabrielhurley Owned by: gabrielhurley
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.

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by kmtracey

  • 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 follow-up: Changed 4 years ago by gabrielhurley

  • Owner changed from nobody to gabrielhurley
  • Status changed from new to assigned

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 4 years ago by gabrielhurley

  • Resolution set to invalid
  • Status changed from assigned to closed

comment:4 in reply to: ↑ 2 Changed 4 years ago by kmtracey

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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 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.