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

Naming Convention for Unit Test Classes in the Test Module. #12283

Open
stone-98 opened this issue Jun 25, 2024 · 7 comments
Open

Naming Convention for Unit Test Classes in the Test Module. #12283

stone-98 opened this issue Jun 25, 2024 · 7 comments
Labels
kind/discussion Category issues related to discussion

Comments

@stone-98
Copy link
Contributor

Describe the bug
Why are the names of unit test classes in the test module using the underscore naming convention? This does not comply with the checkstyle plugin's standards. Should we adjust it?

Expected behavior
The unit test class names in the test module follow the camel case naming convention.

Actually behavior
The unit test class names in the test module currently follow the underscore naming convention.

How to Reproduce
non.

Desktop (please complete the following information):

  • OS: [e.g. Centos]
  • Version [e.g. nacos-server 2.4.0, nacos-client 2.4.0]
  • Module [e.g. naming/config]
  • SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]

Additional context
non.

@KomachiSion
Copy link
Collaborator

Test module is IT, not unit test. But the code style might be adjust it.

@KomachiSion KomachiSion added the kind/discussion Category issues related to discussion label Jun 26, 2024
@stone-98
Copy link
Contributor Author

Got it, it's an IT. Can I adjust the code style to use camel case naming?

@KomachiSion
Copy link
Collaborator

The IT contains so many old version code style from starting opensource, If change the code style will cause many changes.

If you want to do this issue, I suggest you submit PR by packages or It cases so that each PR not contains so many changes.

And need you to make sure the test logic is not changed.

@stone-98
Copy link
Contributor Author

stone-98 commented Jul 1, 2024

The IT contains so many old version code style from starting opensource, If change the code style will cause many changes.

If you want to do this issue, I suggest you submit PR by packages or It cases so that each PR not contains so many changes.

And need you to make sure the test logic is not changed.

Get

@shalk
Copy link
Contributor

shalk commented Jul 11, 2024

@stone-98 report some problem in module test

  1. test/core-test module do not trigger in github workflow.
  2. the it test files do not a have good pattern filename. test/config-test have file match *_CITCase.java, But test/core-test and test/naming-test are *_ITCase.java, maybe is better be *_NITCase.java and*_CoreITCase.java or something

@stone-98
Copy link
Contributor Author

@stone-98 report some problem in module test

  1. test/core-test module do not trigger in github workflow.
  2. the it test files do not a have good pattern filename. test/config-test have file match *_CITCase.java, But test/core-test and test/naming-test are *_ITCase.java, maybe is better be *_NITCase.java and*_CoreITCase.java or something

Thank you, I think this proposal is very good. The integration tests are divided into three modules: config, naming, and core. I will use ConfigITCase, NamingITCase, and CoreITCase respectively. What do you think?

@shalk
Copy link
Contributor

shalk commented Jul 12, 2024

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/discussion Category issues related to discussion
Projects
None yet
Development

No branches or pull requests

3 participants