Skip to content

Commit

Permalink
Fix stalling tests in ArchiveCronTest
Browse files Browse the repository at this point in the history
refs #4141
  • Loading branch information
halfdan committed Sep 8, 2013
1 parent 581b2c3 commit ccd81be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/log-analytics/import_logs.py
Expand Up @@ -1183,7 +1183,7 @@ def _record_hits(self, hits):
if not config.options.dry_run:
piwik.call(
'/piwik.php', args={},
expected_content=PIWIK_EXPECTED_IMAGE,
expected_content=None,

This comment has been minimized.

Copy link
@mattab

mattab Sep 12, 2013

Member

If not testing for expected_content anymore, the feature / parameter can be removed from the import_logs.py (it was the only place it was used)

This comment has been minimized.

Copy link
@halfdan

halfdan Sep 12, 2013

Author Member

Indeed. Currently thinking of a better way to test expected results. A simple comparison doesn't work anymore (since it varies depending on the request).

This comment has been minimized.

Copy link
@mattab

mattab Sep 12, 2013

Member

Test is: when bulk tracking, the json response is checked for a 'tracked' > 0 and 'error' not set.

headers={'Content-type': 'application/json'},
data=data,
on_failure=self._on_tracking_failure
Expand All @@ -1203,10 +1203,10 @@ def _on_tracking_failure(self, response, data):
return response

# remove the successfully tracked hits from payload
succeeded = response['succeeded']
succeeded = response['statistics']['tracked']
data['requests'] = data['requests'][succeeded:]

return response['error']
return response['message']

@staticmethod
def invalidate_reports():
Expand Down

0 comments on commit ccd81be

Please sign in to comment.