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

Fixing unittests #2

Merged
merged 1 commit into from
May 16, 2017
Merged

Fixing unittests #2

merged 1 commit into from
May 16, 2017

Conversation

pkamps
Copy link
Member

@pkamps pkamps commented Dec 7, 2016

Unittest were pretty broken/not maintained. So even if this pull request is not perfectly fixing the unit tests, it's huge step forward.

@pkamps
Copy link
Member Author

pkamps commented Dec 7, 2016

Original pull request:
ezsystems#76

@pkamps
Copy link
Member Author

pkamps commented Jan 11, 2017

This is depending on
mugoweb/ezpublish-legacy#32

@benkmugo
Copy link
Member

@pkamps just adding this here to keep track

With the dependency of the ezpublish PR in place, the unit tests work well, with the exception of the HTTP request timeout test, which fails with the following message:

There was 1 failure:

1) eZSolrBaseRegression::testSendHTTPRequestRetryTimeout
Sending HTTP Request to Solr must be retried a setted number of times (in solr.ini) if server has timed out
Failed asserting that 4 matches expected 40.

/var/www/ezp/extension/ezfind/tests/classes/ezsolrbase_regression.php:99

I'm not convinced this is an issue in general and may be related to the test VM setup somehow, but I haven't looked into it further yet.

@benkmugo
Copy link
Member

Have you had a chance to see if you can replicate that one test issue on your local @pkamps ?

@pkamps
Copy link
Member Author

pkamps commented Feb 3, 2017

That test checks if the timeout and retry configuration for a solr connection is working correctly. The test is actually running fine for me:
4 (timediff) == 4 ( $connectionTimeout * $maxRetries ) in
/var/www/ezp/extension/ezfind/tests/classes/ezsolrbase_regression.php:99

The $connectionTimeout and $maxRetries is set in
/var/www/ezp/extension/ezfind/tests/classes/ezsolrbase_regression.php::setUp (Line 39).

That does not seem to work in your environment, because $connectionTimeout * $maxRetries is 40 for you.

If you like we do a shared screen session and debug the issue.

@pkamps pkamps merged commit 73bb000 into master May 16, 2017
@pkamps pkamps deleted the fix-unit-tests branch May 16, 2017 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants