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

Broken tests #27

Closed
tzolov opened this issue Apr 10, 2013 · 6 comments
Closed

Broken tests #27

tzolov opened this issue Apr 10, 2013 · 6 comments

Comments

@tzolov
Copy link

tzolov commented Apr 10, 2013

To reproduce:
clone the es-hadoop/master repository and run:

curl -XDELETE 'http://localhost:9200/radio'
./gradlew -x clean test build

Both the CascadingHadoopTest and the CascadingLocalTest faile.

Am I doing something wrong or missing some configuration?

@ash211
Copy link
Contributor

ash211 commented Apr 11, 2013

The tests assume you have an Elasticsearch cluster running at localhost:9200 before running the tests. If you didn't have one running, that could be part of the problem.

@tzolov
Copy link
Author

tzolov commented Apr 11, 2013

Hi @ash211,

Haven't mentioned it above but I did run the tests with ES running at localhost:9200 but they fail. Are they passing OK for you? (mind the 'clean' task in the gradlew call).

Checking CascadingHadoopTest and CascadingLocalTest reviles an incorrect assumption that the testWriteToES() method is called before the testReadFromES(). JUnit does not guaranty the order of execution.
I fixed this but it still fails. Seems like the testWriteToES() (in both tests) never calls the RestClinet.create(...) method.

I will do some more digging.

@ash211
Copy link
Contributor

ash211 commented Apr 11, 2013

I observed the same thing -- even with an ES instance running some tests
would fail on my Mac, though I don't remember exactly which ones they were.
I also observed that running tests from gradle ran a different number than
when I ran via Eclipse, where with gradle a few of the Hadoop interfaces
were skipped. It'd be great to get the tests fixed up and better coverage,
as I'm very interested in this project as well. Sounds like you're on it,
which is awesome!

On Thu, Apr 11, 2013 at 7:27 AM, Christian Tzolov
notifications@github.comwrote:

Hi @ash211 https://github.com/ash211,

Haven't mentioned it above but I did run the tests with ES running at
localhost:9200 but they fail. Are they passing OK for you? (mind the
'clean' task in the gradlew call).

Checking CascadingHadoopTest and CascadingLocalTest reviles an incorrect
assumption that the testWriteToES() method is called before the
testReadFromES(). JUnit does not guaranty the order of execution.
I fixed this but it still fails. Seems like the testWriteToES() (in both
tests) never calls the RestClinet.create(...) method.

I will do some more digging.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-16229042
.

@costin
Copy link
Member

costin commented Apr 11, 2013

Guys, thanks for reporting this - I'm on it and hope to fix it shortly. I'm currently working on adding the project into a CI server so the project health can be monitored effectively by everyone. I'll keep you posted.

tzolov added a commit to tzolov/elasticsearch-hadoop that referenced this issue Apr 12, 2013
@tzolov
Copy link
Author

tzolov commented Apr 12, 2013

@costin, i've added a pull request (with couple of commits) that adds embedded es and resolves the tests and related code: https://github.com/elasticsearch/elasticsearch-hadoop/pull/31/commits

@costin
Copy link
Member

costin commented Apr 18, 2013

Fixed in master (see additional comments from #32 )
By the way, thanks for reporting this and the fork.

@costin costin closed this as completed Apr 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants