diff --git a/.travis.yml b/.travis.yml index 3c3e224fb..7a816967b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,8 @@ matrix: env: - TOX_ENV=py35 before_script: + - sudo sed -i "s/fsync/#fsync/" /etc/postgresql/9.4/main/postgresql.conf + - sudo /etc/init.d/postgresql restart - psql -c "CREATE DATABASE testdb ENCODING 'UTF8' TEMPLATE template0;" -U postgres install: - if [[ $ACTION != loadtest_tutorial && $ACTION != loadtest_simulation ]]; then pip install tox; fi diff --git a/loadtests/loadtest/simulation.py b/loadtests/loadtest/simulation.py index 4525dfcd4..3ff250837 100644 --- a/loadtests/loadtest/simulation.py +++ b/loadtests/loadtest/simulation.py @@ -108,7 +108,7 @@ def create(self): self.collection_url(), data=json.dumps({'data': article}), headers={'Content-Type': 'application/json'}) - self.incr_counter(resp.status_code) + self.incr_counter('status-%s' % resp.status_code) self.assertEqual(resp.status_code, 201) def create_put(self): @@ -117,7 +117,7 @@ def create_put(self): self.record_url(uuid.uuid4()), data=json.dumps({'data': article}), headers={'Content-Type': 'application/json'}) - self.incr_counter(resp.status_code) + self.incr_counter('status-%s' % resp.status_code) self.assertEqual(resp.status_code, 201) def batch_create(self): @@ -158,13 +158,13 @@ def filter_sort(self): query_url = '&'.join(['='.join(param) for param in queryparams]) url = self.collection_url() + '?' + query_url resp = self.session.get(url) - self.incr_counter(resp.status_code) + self.incr_counter('status-%s' % resp.status_code) self.assertEqual(resp.status_code, 200) def _patch(self, url, data, status=200): data = json.dumps(data) resp = self.session.patch(url, data) - self.incr_counter(resp.status_code) + self.incr_counter('status-%s' % resp.status_code) self.assertEqual(resp.status_code, status) def _run_batch(self, data): @@ -217,7 +217,7 @@ def batch_update(self): def delete(self): resp = self.session.delete(self.random_url) - self.incr_counter(resp.status_code) + self.incr_counter('status-%s' % resp.status_code) self.assertEqual(resp.status_code, 200) def batch_delete(self):