Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Reduce wait time for tests? #15

Closed
Chris2048 opened this Issue Mar 26, 2013 · 8 comments

Comments

Projects
None yet
2 participants

I've written some tests using es-test, but I require to wait ~1000ms after, say, inserting a document for the index to update. Does es-test run in memory, or can it be made to do so, and do I need to flush the node, or configure it to flush after every operation?

I notice a /data dir is created during the tests. Is it possible to run the test in memory such that a directory isn't needed, or if not change the location of the /data directory (to somewhere under /target).

Thanks.

Sorry, I might mean refresh, rather than flush.

Owner

tlrx commented Mar 27, 2013

Hi,

Are you using the annotations or the EsSetup class?

In this case, the class.

Owner

tlrx commented Apr 5, 2013

Hey

Sorry for the late response. Default use of EsSetup class will start an embedded in-memory ES node (with local transport). All index requests have the refresh flag to true, so you don't need to refresh indices explicitly.

When using EsSetup class, the data dir is already created under ./target and you may override this setting with a -Des.path.data=... JVM options.

The settings used to start the node are defined in the buildNodeSettings method of the following class:
https://github.com/tlrx/elasticsearch-test/blob/master/src/main/java/com/github/tlrx/elasticsearch/test/provider/LocalClientProvider.java

Hope this helps

I'm using the EsSetup class, and /data appears outside /target.
Does the embedded, in-memory node require a local ES instance?

Regards, Chris.

Sorry, ignore the last message - it was cocerning a different setup. My only issue now is that my test hands when it tries to index, eventially throwing a 'unavailableshard' (timeout). The tests can check for existance ok, so I'm not sure what the problem is.

Owner

tlrx commented Sep 19, 2013

Can you provide a tes case to reproduce this bug?

@tlrx tlrx closed this Mar 26, 2014

Owner

tlrx commented Mar 26, 2014

Nothing new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment