launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07445
[Merge] lp:~bac/launchpad/bug-987903 into lp:launchpad
Brad Crittenden has proposed merging lp:~bac/launchpad/bug-987903 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #987903 in Launchpad itself: "lib/lp/code/vocabularies/tests/branch.txt intermittent failure"
https://bugs.launchpad.net/launchpad/+bug/987903
For more details, see:
https://code.launchpad.net/~bac/launchpad/bug-987903/+merge/104116
= Summary =
During parallel testing we've seen branch.txt fail due to an ordering
issue. The order of items retrieved by the vocabulary is not
significant, so the results are now sorted to avoid this issue.
== Proposed fix ==
Sort branches by name before printing.
== Pre-implementation notes ==
Talk with Gary.
== Tests ==
bin/test -vvm lp.code -t branch.txt
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/code/vocabularies/tests/branch.txt
--
https://code.launchpad.net/~bac/launchpad/bug-987903/+merge/104116
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/bug-987903 into lp:launchpad.
=== modified file 'lib/lp/code/vocabularies/tests/branch.txt'
--- lib/lp/code/vocabularies/tests/branch.txt 2011-03-07 01:31:32 +0000
+++ lib/lp/code/vocabularies/tests/branch.txt 2012-04-30 14:05:33 +0000
@@ -20,21 +20,22 @@
# Just use None as the context.
>>> branch_vocabulary = vocabulary_registry.get(None, "Branch")
>>> def print_vocab_branches(vocab, search):
- ... for term in vocab.searchForTerms(search):
- ... print term.value.unique_name
+ ... terms = vocab.searchForTerms(search)
+ ... for name in sorted(term.value.unique_name for term in terms):
+ ... print name
>>> print_vocab_branches(branch_vocabulary, 'main')
- ~name12/firefox/main
- ~stevea/thunderbird/main
~justdave/+junk/main
~kiko/+junk/main
- ~vcs-imports/evolution/main
+ ~name12/firefox/main
~name12/gnome-terminal/main
+ ~stevea/thunderbird/main
+ ~vcs-imports/evolution/main
>>> print_vocab_branches(branch_vocabulary, 'vcs-imports')
+ ~vcs-imports/evolution/import
+ ~vcs-imports/evolution/main
~vcs-imports/gnome-terminal/import
- ~vcs-imports/evolution/import
- ~vcs-imports/evolution/main
>>> print_vocab_branches(branch_vocabulary, 'evolution')
~carlos/evolution/2.0
@@ -81,14 +82,14 @@
>>> login(ADMIN_EMAIL)
>>> print_vocab_branches(branch_vocabulary, 'trunk')
- ~spiv/+junk/trunk
- ~limi/+junk/trunk
~landscape-developers/landscape/trunk
+ ~limi/+junk/trunk
+ ~spiv/+junk/trunk
>>> login(ANONYMOUS)
>>> print_vocab_branches(branch_vocabulary, 'trunk')
+ ~limi/+junk/trunk
~spiv/+junk/trunk
- ~limi/+junk/trunk
BranchRestrictedOnProduct
Follow ups