nacos Naming Convention for Unit Test Classes in the Test Module.

pzfprimi  于 5个月前  发布在  Nacos
关注(0)|答案(7)|浏览(103)

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.

sycxhyv7

sycxhyv71#

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

ttp71kqs

ttp71kqs2#

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

tpxzln5u

tpxzln5u3#

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.

zu0ti5jz

zu0ti5jz4#

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

pnwntuvh

pnwntuvh5#

@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
nxowjjhe

nxowjjhe6#

@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?

相关问题