Closed lucafavatella closed 7 years ago
@lucafavatella - are you interested in running the integration test suite yourself?
@lukebakken Yes.
I understand a Riak server is needed, and you commented on some setup script - I will have a look at it.
My development process often involve Travis CI for independent checking of reproducibility of result. Would you welcome patches for running the integration tests on Travis CI? I think it would simplify third party contributions.
Relevant comment in code:
@echo " Also, it would be great to document here what other"
@echo " Riak configuration bits are prerequisites for running"
@echo " the integration test suite..........."
I'll see what I can do. If sudo
is required on Travis CI for running integration tests I'd rather not switch due to the fact that it would add time to the build process.
I should also add a make test
target that would try the integration test suite assuming a Riak node is available locally, and would error out helpfully if none is present.
@lukebakken This is where I arrived. It requires sudo though.
Difficult not to use sudo with Travis CI Riak, as its riak-admin required sudo.
BTW with the travis config I mentioned above (using sudo) I get 3 failures only:
riakc_pb_socket_tests:867: integration_tests (create a search index / get / list / delete with default timeout)...*failed*
in function riakc_pb_socket_tests:'-integration_tests/0-fun-147-'/2 (test/riakc_pb_socket_tests.erl, line 892)
in call from riakc_pb_socket_tests:'-integration_tests/0-fun-149-'/0 (test/riakc_pb_socket_tests.erl, line 889)
**error:{assertEqual,[{module,riakc_pb_socket_tests},
{line,892},
{expression,"riakc_pb_socket : list_search_indexes ( Pid )"},
{expected,{ok,[[{index,<<"indextest">>},
{schema,<<"_yz_default">>},
{n_val,2}]]}},
{value,{ok,[]}}]}
output:<<"">>
...
riakc_pb_socket_tests:965: integration_tests (create a search index and tie to a bucket)...*failed*
in function riakc_pb_socket_tests:'-integration_tests/0-fun-161-'/0 (test/riakc_pb_socket_tests.erl, line 971)
**error:{badmatch,{error,<<"Invalid bucket properties: [{search_index,<<\"myindex does no"...>>}}
output:<<"">>
riakc_pb_socket_tests:980: integration_tests (search utf8)...*failed*
in function riakc_pb_socket_tests:'-integration_tests/0-fun-164-'/0 (test/riakc_pb_socket_tests.erl, line 987)
**error:{badmatch,{error,<<"Invalid bucket properties: [{search_index,<<\"myindex does no"...>>}}
output:<<"">>
...
=======================================================
Failed: 3. Skipped: 0. Passed: 92.
One or more tests were cancelled.
Those failures are probably due to Travis using an older version of Riak (which is another problem with running integration tests on Travis CI). Newer versions have synchronous search index creation which ensures the index exists in Solr before returning from the operation.
The PHP client does go through the process of installing the latest Riak and configuring it: https://github.com/basho/riak-php-client/blob/develop/.travis.yml
Comment taken from 4557759.