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

be able to customize es version #51

Open
sibelius opened this issue Jun 29, 2023 · 14 comments
Open

be able to customize es version #51

sibelius opened this issue Jun 29, 2023 · 14 comments

Comments

@sibelius
Copy link

instead of forking, why not enable customization esVersion

is there any block of this?

We are willing to contribute with the fix

@Blankll
Copy link

Blankll commented Jul 16, 2023

Hi @sibelius , I just refer to this project and created a similar lib as an alternative to it: jest-search, it enables customizable es version and also supports like OpenSearch, and ZincSearch, you can have a try if you want, feel free to raise issues if you get any block when using it, I'm seeking for any feedbacks!

@sibelius
Copy link
Author

Can you export startEngine and stopEngine?

@Blankll
Copy link

Blankll commented Jul 16, 2023

Hi @sibelius , should not be a problem if you want, I am just bit curious your use case, would be great if you could provide me some context of the reason

@sibelius
Copy link
Author

Our tests need both mongo and elasticsearch

@Blankll
Copy link

Blankll commented Jul 16, 2023

Hi @sibelius exported in v1.0.1

@sibelius
Copy link
Author

I'm getting this error

ConnectionError: other side closed - Local: ::1:53051, Remote: ::1:9600

@Blankll
Copy link

Blankll commented Jul 18, 2023

Hi @sibelius thanks for reporting the issue, could you pls pass the env DEBUG=jest-search for instance

"test": "DEBUG='jest-search' jest --runInBand  .....

and send me the printed logs to me? that will help me to diagnose the issues thanks,

and feel free to raise issues in the repo

@sibelius
Copy link
Author

we are using "@elastic/elasticsearch": "8.8.0",

@Blankll
Copy link

Blankll commented Jul 18, 2023

Hi @sibelius the library underline is not rely on any elastic/OpenSearch client , so the version of client should not related, could you provide me:

  1. what's the version of elastic search you pass to startEngine
  2. will be great if you provide me the logs as I mentioned above
  3. the way the client connects to es that started by the library and it only supports HTTP,

and there is an example that you can refer: https://github.com/Blankll/event-search

@sibelius
Copy link
Author

do we need runInBand ?

@Blankll
Copy link

Blankll commented Jul 24, 2023

yes @sibelius

@sibelius
Copy link
Author

why ?

@Blankll
Copy link

Blankll commented Jul 24, 2023

if you use by global setup it is fine to not use runInBand, just make sure the data id u insert to es in different cases are not in conflict,
if you start the server by calling startEngine in *.test.ts, it is possible that the port and some file that elasticsearch relies on like data folder under es folder are getting conflicts since they are using same binary in parallel,

we didn't do sufficient tests on this case, I'd like to know more context for getting rid of runInBand, I can do further tests if it is a commonly requirement

@sibelius
Copy link
Author

can you try something like this shelfio/jest-mongodb#209?

create 1 cluster or something per test file ?

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

No branches or pull requests

2 participants