Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #238 from mozilla-services/238-fix-loadtest
Browse files Browse the repository at this point in the history
IndexError: list index out of range
  • Loading branch information
almet committed Apr 2, 2015
2 parents 2b666b7 + b7a6b2d commit 51cef82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions loadtests/loadtest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ def setUp(self):
This method is called as many times as number of hits.
"""
while self.nb_initial_records > 0:
nb_initial_records = self.nb_initial_records
while nb_initial_records > 0:
self.create()
self.nb_initial_records -= 1
nb_initial_records -= 1

resp = self.session.get(self.api_url('articles'), auth=self.auth)
records = resp.json()['items']
Expand Down

0 comments on commit 51cef82

Please sign in to comment.