Merge lp:~jtv/launchpad/db-bug-476218 into lp:launchpad/db-devel

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~jtv/launchpad/db-bug-476218
Merge into: lp:launchpad/db-devel
Diff against target: 12 lines (+5/-0)
1 file modified
lib/lp/translations/doc/fix_translation_credits.txt (+5/-0)
To merge this branch: bzr merge lp:~jtv/launchpad/db-bug-476218
Reviewer Review Type Date Requested Status
Michael Nelson (community) release-critical Approve
Abel Deuring (community) code Approve
Review via email: mp+14532@code.launchpad.net

Commit message

Fix buildbot breakage: test failed to force a dirty db.

To post a comment you must log in.
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

= Bug 476218 =

Buildbot was breaking on a test gettext-check-messages.txt that nobody
had touched. A POTranslation it created used an id that was already
taken. As Michael Nelson found out, this happened only when the test
ran in conjunction with fix_translation_credits.txt.

The problem was that that latter test runs a script, which updates the
database, but doesn't do anything to tell the test framework that there
have been any database changes. So the database did not get a full
reset.

This hints at another bug somewhere: the id sequences normally get reset
to one beyond the highest id currently represented in the table. It
follows that this problem should not have happened, at least not as I
described. So either my description is wrong, or there is another
problem with the way ids get reset.

We'll still have to look into that, but this fix unbreaks the tests.

Jeroen

Revision history for this message
Abel Deuring (adeuring) wrote :

Hu Jeroen,

this look good as a quick fix. But as you point out, we should figure out why the DB is not automatically reset. Could you file a bug about it?

review: Approve (code)
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Thanks for doing this so quickly jtv!

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/doc/fix_translation_credits.txt'
2--- lib/lp/translations/doc/fix_translation_credits.txt 2009-11-05 00:09:30 +0000
3+++ lib/lp/translations/doc/fix_translation_credits.txt 2009-11-06 08:45:23 +0000
4@@ -15,3 +15,8 @@
5 INFO Processed ...
6 INFO Done.
7
8+After altering the database from a separate process, we must tell the
9+test setup that the database is dirty in spite of appearances.
10+
11+ >>> from canonical.launchpad.ftests.harness import LaunchpadTestSetup
12+ >>> LaunchpadTestSetup().force_dirty_database()

Subscribers

People subscribed via source and target branches

to status/vote changes: