Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to some local testing issues #11760

Merged
merged 6 commits into from Jun 9, 2017
Merged

Fixes to some local testing issues #11760

merged 6 commits into from Jun 9, 2017

Conversation

diosmosis
Copy link
Member

This PR can be reviewed commit by commit.

Changes:

  • AutoSuggestAPITest skipped a test on travis-ci since the cause of the failure was unknown. Found the cause to be an error in tracking in the associated fixture. The fixture used bulk tracking, which unsets the user agent after queuing a request (see https://github.com/piwik/piwik-php-tracker/blob/master/PiwikTracker.php#L1534). Re-setting the user agent in the fixture fixed the tests (verified the new output files manually).
  • In CliMulti, ignore defunct processes (aka, zombie processes) in ps output. In certain environments, (such as the php:5.6-fpm docker container), exiting pre-maturely in a RequestCommand execution can cause the PHP process to become a zombie, so it remains in ps output. This caused CliMultiTest to hang indefinitely.
  • Set the URL to two requests that were missing it in the ThreeVisitsWithCustomEvents fixture. The default URL depends on the $_SERVER['HTTP_HOST'] value, which during tests depends on the [tests] http_host INI config. Which means it could be different based on a dev's local environment.
  • OneVisitorTwoVisitsTest was re-used in another test (DuplicateActionsTest). This caused PHPUnit to skip the test when both tests were run together (eg, on travis-ci), since PHPUnit doesn't use the composer autoloader.
  • In the SomeVisitsCustomVariablesCampaignsNotHeuristics fixture, encode the attribution date time. The Piwik tracker doesn't URL encode this value, so the space in the date time value is sent raw. In my environment this caused the request to fail before even getting to Piwik. This might be something that needs to be fixed in a BC way in the PHP tracker too.

Should fix #11746

@mattab mattab added this to the 3.0.5 milestone Jun 2, 2017
@mattab
Copy link
Member

mattab commented Jun 2, 2017

Hi @diosmosis - thanks for the useful PR!

@sgiehl sgiehl added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Jun 2, 2017
@sgiehl sgiehl merged commit e1dd712 into matomo-org:3.x-dev Jun 9, 2017
@diosmosis diosmosis deleted the travis-ci-inconsistencies branch June 9, 2017 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One test fails locally but seems to work on Travis CI
3 participants