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

problem running count-test #10

Closed
pcsanwald opened this issue Jan 14, 2013 · 4 comments
Closed

problem running count-test #10

pcsanwald opened this issue Jan 14, 2013 · 4 comments

Comments

@pcsanwald
Copy link

I've cloned elastisch, and am trying to run the tests locally. I ran into a problem when running the tests. "lein all test" using leiningen2, and the below test give me the same result. Since the CI build is passing, it seems like this must be a problem with my local server. This is a clone of the master branch on github.

it smells like a local problem, but I'm not sure the best place to look. any ideas?

$ lein -version
Leiningen 2.0.0-preview10 on Java 1.7.0_04 Java HotSpot(TM) 64-Bit Server VM

Here's the test that fails, and the stacktrace:

$ lein test clojurewerkz.elastisch.rest-api.count-test
Reflection warning, clj_http/core.clj:110 - reference to field close can't be resolved.
Reflection warning, clj_http/core.clj:220 - call to org.apache.http.entity.StringEntity ctor can't be resolved.
Reflection warning, clj_http/core.clj:244 - call to writeTo can't be resolved.
Reflection warning, cheshire/generate.clj:84 - call to writeNumber can't be resolved.
Reflection warning, cheshire/generate.clj:84 - call to writeNumber can't be resolved.
Reflection warning, cheshire/generate.clj:84 - call to writeNumber can't be resolved.
Reflection warning, cheshire/generate.clj:104 - call to writeNumber can't be resolved.
Reflection warning, cheshire/custom.clj:133 - call to writeNumber can't be resolved.
Reflection warning, cheshire/custom.clj:212 - reference to field toBigInteger can't be resolved.

lein test clojurewerkz.elastisch.rest-api.count-test
Exception in thread "main" java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
at clj_http.core$request.invoke(core.clj:223)
at clojure.lang.Var.invoke(Var.java:415)
at clj_http.client$wrap_request_timing$fn__929.invoke(client.clj:473)
at clj_http.client$wrap_lower_case_headers$fn__926.invoke(client.clj:464)
at clj_http.client$wrap_query_params$fn__871.invoke(client.clj:342)
at clj_http.client$wrap_basic_auth$fn__875.invoke(client.clj:358)
at clj_http.client$wrap_oauth$fn__879.invoke(client.clj:368)
at clj_http.client$wrap_user_info$fn__884.invoke(client.clj:381)
at clj_http.client$wrap_url$fn__914.invoke(client.clj:439)
at clj_http.client$wrap_redirects$fn__763.invoke(client.clj:127)
at clj_http.client$wrap_decompression$fn__788.invoke(client.clj:181)
at clj_http.client$wrap_input_coercion$fn__842.invoke(client.clj:276)
at clj_http.client$wrap_output_coercion$fn__838.invoke(client.clj:246)
at clj_http.client$wrap_exceptions$fn__749.invoke(client.clj:89)
at clj_http.client$wrap_accept$fn__853.invoke(client.clj:303)
at clj_http.client$wrap_accept_encoding$fn__858.invoke(client.clj:318)
at clj_http.client$wrap_content_type$fn__849.invoke(client.clj:294)
at clj_http.client$wrap_form_params$fn__894.invoke(client.clj:405)
at clj_http.client$wrap_nested_params$fn__911.invoke(client.clj:429)
at clj_http.client$wrap_method$fn__889.invoke(client.clj:388)
at clj_http.cookies$wrap_cookies$fn__89.invoke(cookies.clj:116)
at clj_http.cookies$wrap_cookie_store$fn__94.invoke(cookies.clj:141)
at clj_http.links$wrap_links$fn__126.invoke(links.clj:50)
at clj_http.client$wrap_unknown_host$fn__919.invoke(client.clj:448)
at clj_http.client$delete.doInvoke(client.clj:561)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at clojurewerkz.elastisch.rest$delete.invoke(rest.clj:39)
at clojurewerkz.elastisch.rest.index$delete.invoke(index.clj:51)
at clojurewerkz.elastisch.fixtures$reset_indexes_STAR_.invoke(fixtures.clj:11)
at clojurewerkz.elastisch.fixtures$reset_indexes.invoke(fixtures.clj:16)
at clojure.test$compose_fixtures$fn__6920$fn__6921.invoke(test.clj:678)
... snipped for brevity
Tests failed.

@michaelklishin
Copy link
Member

It cannot connect to the default endpoint (http://localhost:9200 or whatever ELASTICSEARCH_URL points to).

@pcsanwald
Copy link
Author

got it. do the tests currently require a separate instance of elasticsearch
running on ELASTICSEARCH_URL?

if so, would you have any interest if I were to submit a patch that fired
up an in-memory instance of elasticsearch to test against?

On Mon, Jan 14, 2013 at 5:38 PM, Michael Klishin
notifications@github.comwrote:

ELASTICSEARCH_URL

@michaelklishin
Copy link
Member

Yes, the suite currently assumes you have ElasticSearch running locally. I'm not against starting an instance for Elastisch to use but sounds like if you want to use Elastisch, you will have ElasticSearch available one way or another.

@devth
Copy link

devth commented Jun 10, 2016

Anything ever happen with this? An in-memory ES is extremely useful for testing. This is what ZooKeeper provides as well.

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

No branches or pull requests

3 participants