On clean install getting 6 errors on phpunit
yoshkin opened this issue · 3 comments
yoshkin commented
On clean install i`m running phpunit tests and getting 6 errors (all about elastic docker container):
docker-compose exec php sh -lc "./bin/phpunit "
#!/usr/bin/env php
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.
Testing Api Test Suite
......E................E...EEEE...................... 53 / 53 (100%)
Time: 2.2 minutes, Memory: 20.00MB
There were 6 errors:
1) App\Tests\Application\Query\Event\GetEvents\GetEventsTest::processed_events_must_be_in_elastic_search
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
...
2) App\Tests\Infrastructure\Share\Event\Query\EventElasticRepositoryTest::an_event_should_be_stored_in_elastic
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
...
3) App\Tests\UI\Http\Rest\Controller\Events\GetEventsControllerTest::events_list_must_return_404_when_no_page_found
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
...
4) App\Tests\UI\Http\Rest\Controller\Events\GetEventsControllerTest::events_should_be_present_in_elastic_search
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
...
5) App\Tests\UI\Http\Rest\Controller\Events\GetEventsControllerTest::given_invalid_page_returns_400_status
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
...
6) App\Tests\UI\Http\Rest\Controller\Events\GetEventsControllerTest::given_invalid_limit_returns_400_status
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
...
ERRORS!
Tests: 53, Assertions: 92, Errors: 6.
Generating code coverage report in HTML format ... done
Legacy deprecation notices (1)
make: *** [phpunit] Error 2
zawiszaty commented
Elasticsearch don't work in your docker container, propably https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html don't work. See docker-compose logs
jorge07 commented
Thanks for report @zawiszaty. Yes seems totally related with elastic. Can you provide the elastic logs?
jorge07 commented
I don't know why travis isn't failing.... Anyway I upgraded the elastic stack and improved the config. It should be enough to fix this issue.