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

New vagrantbox #742

Merged
merged 7 commits into from
Jan 13, 2015
Merged

New vagrantbox #742

merged 7 commits into from
Jan 13, 2015

Conversation

im-denisenko
Copy link
Contributor

  • Vagrantfile was updated to use ubuntu/precise32 as default box and ansible as provision system
  • Travis setup was also rewrited because this is very similar process as creation of new vagrant box

Use same way as vagrant to setup test environment
- Plugins versions were outdated and written for earlier versions of ES
- Versions updated to latest available for ES 1.3.4
Config option "action.wait_on_mapping_change" was removed since ES 1.3.0
elastic/elasticsearch#6648
@coveralls
Copy link

Coverage Status

Coverage increased (+2.07%) when pulling 3b9a099 on im-denisenko:new-vagrantbox into 6150be2 on ruflin:master.

@im-denisenko im-denisenko mentioned this pull request Jan 7, 2015
ruflin added a commit that referenced this pull request Jan 13, 2015
@ruflin ruflin merged commit 84cabf0 into ruflin:master Jan 13, 2015
@ruflin
Copy link
Owner

ruflin commented Jan 13, 2015

Merged. Is there an easy option to start multiple instances of ES that work in a cluster?

@im-denisenko
Copy link
Contributor Author

Easiest one is create two config files and add custom logic into /etc/init.d/elasticsearch, i guess.
I can fix it later, if i'll figure out how this bash magic works.

@ruflin
Copy link
Owner

ruflin commented Jan 13, 2015

Sounds good. Actually that all the tests work properly at least 3 instances are needed, as one is shut down to test if shutting down works.

@im-denisenko im-denisenko deleted the new-vagrantbox branch January 14, 2015 19:04
@im-denisenko
Copy link
Contributor Author

How about add something like this after every shutdown call?

system('sudo service elasticsearch restart');
sleep(10);

It's quite ugly, but provides a way to restore all shutdowned nodes at the end of each test, so:

  • two nodes will be enough,
  • all runs of phpunit will produce same result (good for virtualbox)
  • Elastica\Cluster::shutdown can be tested too

@ruflin
Copy link
Owner

ruflin commented Jan 15, 2015

There are two reasons for the multiple instances:

  • Make sure that the tests also work properly with multiple instances (which was not the case in the beginning) to represent a real cluster
  • Testing the shutdown

For the first part we only need at least 3 instances. For the second part, in case we restart the service with the above command, I'm not sure how we handle the waiting for the starting of the service. Perhaps we should run the "shutdown" tests in a second independent test set, means in case something goes wrong it does not jeopardise the rest of the tests.

This was referenced Jan 20, 2015
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.

3 participants