Closed dadoonet closed 9 years ago
@imotov Thanks for your comments. Wanna review this?
@dadoonet The change LGTM but is there a simple way to add a test for it?
Thanks Igor.
I have Ec2DiscoveryITest
which simply tries to start a node and make sure that it does not fail. May be I should mock AWS API as I did for Azure?
My plan was actually to test this manually: create 3 ec2 nodes with the SNAPSHOT version of the plugin and check that discovery still works fine.
Any other suggestion?
BTW I just tested it on Azure project which has more tests and it seems to work fine so far.
In order to test if it injects any unicast hosts we have to have some instances running, which doesn't seem practical. Mocking it would be a good idea, but it would rather test elasticsearch than the plugin. So, I have no other suggestions, unfortunately.
@imotov FYI I added a new commit as injecting AmazonEC2
was not possible (it's not an elasticsearch aws object but a pure AWS SDK object - not instantiated by guice that is).
Going to run some tests now on real instances.
@imotov I needed also to add some changes in pom.xml and plugin.xml.
Tested on AWS platform with elasticsearch version[2.0.0-SNAPSHOT], pid[26010], build[69f74d7/2015-01-12T18:29:44Z]
and this patch.
2 nodes cluster. Discovery went well.
Could you check one more time (last :) ) so I can squash the commits and push the change? Thanks!
LGTM
@imotov Actually, I think there is something wrong with this change. We were removing Multicast before the change and we don't remove it anymore. I think we need to fix that. Sadly, it will require a change in elasticsearch core as we don't have access anymore to some of the methods we were using.
Related to https://github.com/elasticsearch/elasticsearch/pull/9099