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

[5162] Add elasticsearch tests #5170

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

llowinge
Copy link
Contributor

Covers:

  • Index data (CQ)
  • Search (CQ)
  • Multisearch (CQ)
  • GetById (CQ)
  • Update (CQ)
  • Delete (CQ)
  • DeleteIndex (CQ)
  • Bulk (CQ)
  • Exists (CQ)
  • Ping (CQ)

@llowinge llowinge force-pushed the 5162-add-elasticsearch-tests branch 2 times, most recently from 0a9e06d to c8e5feb Compare August 10, 2023 11:53
@llowinge
Copy link
Contributor Author

@jamesnetherton Can you please review ?

Copy link
Contributor

@jamesnetherton jamesnetherton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment / question / potential improvement. Otherwise everything else LGTM.


@SuppressWarnings("unused")
private static String[] componentNames() {
return new String[] { "elasticsearch" };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory this is not required and we could just hard code the component name (using to instead of toD).

Or is it worth keeping in case we do eventually want to test the component with the Quarkus managed ES client?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it there for the Quarkus managed ES client. But i agree it is not useful now at all. Maybe i should add comment there why it is done like that to that method ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please add a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left comment, i hope it is OK.

@llowinge llowinge force-pushed the 5162-add-elasticsearch-tests branch from c8e5feb to 5cf8578 Compare August 10, 2023 18:21
@aldettinger
Copy link
Contributor

LGTM. Do we need tests to cover things like certificatePath or enableSSL ? Not sure as native is not tested.

@jamesnetherton
Copy link
Contributor

Do we need tests to cover things like certificatePath or enableSSL

We could maybe follow up with that. These initial tests are mostly a reproduction of what we had for the previous elasticsearch-rest extension.

@aldettinger
Copy link
Contributor

Yes, that's ok in this state. Plus if we promote it to native one day, then we could update the test coverage at this stage YAGNI style.

@llowinge
Copy link
Contributor Author

@aldettinger That is great idea, but given it was only for JVM, i think we are safe there. Basically all the tests are probably overkill, but i've ported all of them for future benefits. I've created followup issue for the SSL #5174.

@aldettinger
Copy link
Contributor

aldettinger commented Aug 11, 2023

Not sure, it's overkill. Those features are present in the camel component doc, so this is good to have them already covered in this PR 👍 And yes, ssl features could be in future.

@jamesnetherton jamesnetherton merged commit 7424027 into apache:main Aug 11, 2023
20 checks passed
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

Successfully merging this pull request may close these issues.

3 participants