Skip to content

[CALCITE-3601] Update elasticsearch tests upgrade from junit4 to junit5#1681

Closed
XuQianJin-Stars wants to merge 4 commits intoapache:masterfrom
XuQianJin-Stars:CALCITE-3601
Closed

[CALCITE-3601] Update elasticsearch tests upgrade from junit4 to junit5#1681
XuQianJin-Stars wants to merge 4 commits intoapache:masterfrom
XuQianJin-Stars:CALCITE-3601

Conversation

@XuQianJin-Stars
Copy link
Contributor

@XuQianJin-Stars XuQianJin-Stars commented Dec 22, 2019

As illustrated in CALCITE-3601
Update elasticsearch tests upgrade from junit4 to junit5.

* </pre>
*
* @param index index of the index
* @param index index of the index
Copy link
Contributor

Choose a reason for hiding this comment

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

Please refrain from aligning parameter descriptions.
It creates lots of unrelated changes, and it is prone to merge conflicts in the future.

See sample reasoning (~ it creates problems for future maintenance ): https://google.github.io/styleguide/javaguide.html#s4.6.3-horizontal-alignment

Copy link
Contributor Author

@XuQianJin-Stars XuQianJin-Stars Dec 22, 2019

Choose a reason for hiding this comment

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

Please refrain from aligning parameter descriptions.
It creates lots of unrelated changes, and it is prone to merge conflicts in the future.

See sample reasoning (~ it creates problems for future maintenance ): https://google.github.io/styleguide/javaguide.html#s4.6.3-horizontal-alignment

well, Let me change it. There is something wrong with my code style.

@vlsi
Copy link
Contributor

vlsi commented Dec 22, 2019

It turned out to be simpler than I initially thought.

I don't quite like that the PR includes javadoc re-formats for EmbeddedElasticsearchPolicy class, however, I'm inclined that it does not harm that much for EmbeddedElasticsearchPolicy because it is not that likely different PRs would edit the class.

return node.httpAddress();
}

@Override public void afterAll(ExtensionContext context) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a small note: could you please move the methods to the location of previous before and after?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well , Ok Let me change it. In addition, can we add style to the calite project to define the code format in calite?

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean by "code format"?

I'm inclined that we should prefer https://github.com/apache/calcite/blob/master/.editorconfig when possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

PS. please move afterAll as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @vlsi Is your original idea to implement declarative registration extensions and kotlin?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I just had no idea how to approach the test.

The approach you use seems to be nice. I have not checked TestContainer best practices yet. They have a case for "keeping test container up for multiple test classes", so there might be something to learn from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I just had no idea how to approach the test.

The approach you use seems to be nice. I have not checked TestContainer best practices yet. They have a case for "keeping test container up for multiple test classes", so there might be something to learn from.

I am also interested in learning about "keeping test container up for multiple test classes".

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like JUnit provides no solution yet, so TestContainers use their own: https://github.com/testcontainers/testcontainers-java/pull/887/files#diff-0dcf4d2cadeb3e526020477bc12e1420R73

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like JUnit provides no solution yet, so TestContainers use their own: https://github.com/testcontainers/testcontainers-java/pull/887/files#diff-0dcf4d2cadeb3e526020477bc12e1420R73

Well, indeed, TestContainers also looks good. Thank you very much for letting me learn something new.

@vlsi vlsi closed this in 4415171 Dec 26, 2019
wangxlong pushed a commit to wangxlong/calcite that referenced this pull request Feb 13, 2020
jamesstarr pushed a commit to jamesstarr/calcite that referenced this pull request Aug 28, 2025
jamesstarr pushed a commit to jamesstarr/calcite that referenced this pull request Mar 16, 2026
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.

2 participants