Skip to content

Commit

Permalink
Default to lang=en only when getting top pages in stress test.
Browse files Browse the repository at this point in the history
  • Loading branch information
siznax committed Dec 1, 2017
1 parent 890470e commit 65893ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def main(args):
GET top pages or random pages forever
"""
delay = args.delay
lang = args.lang or 'en'
lang = args.lang
top = args.top

start = int(time.time())
Expand All @@ -108,6 +108,9 @@ def main(args):

while len(pages) > 0:
language = lang or random.choice(languages())
if top and not lang:
language = 'en'

page = wptools.page(lang=language, silent=True)
if top:
page = wptools.page(pages.pop(0), lang=language, silent=True)
Expand Down

0 comments on commit 65893ba

Please sign in to comment.