tests depend on precise values factory returns

Bug #572163 reported by Michael Hudson-Doyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Curtis Hovey

Bug Description

 I changed the factory to return different values from getUniqueInteger (from where all the uniquification comes in the factory) and the following tests failed:

lp.codehosting.scanner.tests.test_email.TestBzrSyncEmail.test_import_uncommit (code)
lp.soyuz.tests.test_archive.TestSeriesWithSources.test_series_with_sources_ordered_by_version (soyuz)
archive-deletion_txt (soyuz)
branch-karma_txt (code)
person-admin-views_txt (registry)
xx-branch-index_txt (code)
xx-distribution-packages_txt (registry)

These tests should all be fixed.

Related branches

Changed in soyuz:
status: New → Triaged
importance: Undecided → Low
tags: added: tech-debt
Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: Undecided → High
status: New → Triaged
milestone: none → 10.05
tags: added: trivial
Tim Penhey (thumper)
Changed in launchpad-code:
status: New → Triaged
importance: Undecided → High
milestone: none → 10.05
Revision history for this message
Tim Penhey (thumper) wrote :

lp.codehosting.scanner.tests.test_email.TestBzrSyncEmail.test_import_uncommit passes when I change the default start value.

The code looks fine. Do you have the original failure email?

Changed in launchpad-code:
status: Triaged → In Progress
assignee: nobody → Tim Penhey (thumper)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Ah, looking at the error I see that what happened was that the name of the branch was longer, and so the subject header wrapped:

AssertionError: not equal:
a = u'[Branch ~person-name1119/product-name1114/branch1121] 1 revision removed'
b = '[Branch ~person-name1119/product-name1114/branch1121] 1 revision\n\tremoved'

I guess this is a fragility in the test, but not a very serious one.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
Changed in launchpad-code:
status: In Progress → Fix Committed
tags: added: qa-needstesting
Revision history for this message
Ursula Junque (ursinha) wrote :
Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Changed in launchpad-code:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.