Skip to content

Fix running all ES plugin tests in the same JVM#13731

Merged
kokosing merged 2 commits intotrinodb:masterfrom
Laonel:fix-es-tests-stats-bean-names
Aug 20, 2022
Merged

Fix running all ES plugin tests in the same JVM#13731
kokosing merged 2 commits intotrinodb:masterfrom
Laonel:fix-es-tests-stats-bean-names

Conversation

@Laonel
Copy link
Copy Markdown
Member

@Laonel Laonel commented Aug 18, 2022

Description

Test io.trino.plugin.elasticsearch.TestElasticsearchBackpressure is currently being run in a separate CI job, because the JMX stats bean that is used verify backpressure would be overriden by other tests.

To make this test work with all the others, we can rename the elasticsearch catalog in this test to a unique name, so that the JMX bean receives a unique name.

Is this change a fix, improvement, new feature, refactoring, or other?

Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Tests of Elasticsearch connector

How would you describe this change to a non-technical end user or system administrator?

N/A

Related issues, pull requests, and links

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Aug 18, 2022
@Laonel Laonel changed the title Fix es tests stats bean names Fix running all ES plugin tests in the same JVM Aug 18, 2022
@Laonel Laonel force-pushed the fix-es-tests-stats-bean-names branch from 1935fd3 to 6578a02 Compare August 18, 2022 10:29
Copy link
Copy Markdown
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

LGTM % comment.

Thanks a lot for this improvement. This will reduce queuing on our CI as well.

@Laonel Laonel force-pushed the fix-es-tests-stats-bean-names branch from 6578a02 to 794b058 Compare August 18, 2022 10:57
1);
1,
// Use a unique catalog name to make sure JMX stats beans are unique and not affected by other tests
"elasticsearch-backpressure");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we use something like io.trino.testing.sql.TestTable#randomTableSuffix? Or is it overkill?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We might, I decided to go with a static name since this is executed just once for just one test.

A different approach could be to make the catalog name randomized on the ElasticsearchQueryRunner level, but since it was just the backpressure test causing the issue I decided to limit the changes to that test.

@Laonel Laonel requested a review from kokosing August 19, 2022 14:08
@kokosing kokosing merged commit 111b3ee into trinodb:master Aug 20, 2022
@kokosing
Copy link
Copy Markdown
Member

Thanks!

@github-actions github-actions bot added this to the 394 milestone Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants