Shardingsphere: Use YAML file instead of inline string in test cases

Created on 5 May 2020  ·  15Comments  ·  Source: apache/shardingsphere

Some cases include YAML inline string for testing orchestration persistent which are hard to read.
It is better to put the YAML inline string into YAML file.

Some test cases which need to be refactored:

  • [x] ConfigCenterTest
  • [x] SchemaChangedListenerTest
  • [x] OrchestrationSpringBootRegistryShardingTest
  • [x] OrchestrationSpringBootRegistryEncryptTest
  • [ ] OrchestrationSpringBootRegistryMasterSlaveTest
  • [x] HttpServerHandlerTest
  • [ ] Still to be found...
governance good first issue test

Most helpful comment

can i try the test ConfigCenterTest ?

hey is it possible for you to pick other test ? , because I have kinda started working on it.

yeah i can pick other @sukumaar

All 15 comments

Can I pick this issue? This is my first issue so is it ok if I work on ConfigCenterTest file first and raise PR ?

@terrymanu We are optimizing the unit test coverage of the orchestration module now,I will optimize the above test classes at the same time.

@menghaoranss hey if you are busy with something and need some hand then please let me work on this , I also want to contribute to open source community :-)

@sukumaar good ,you can pick a task to respond to.

what can i do for this case?

can i try the test ConfigCenterTest ?

can i try the test ConfigCenterTest ?

of course,looking forward to your pull request.

can i try the test ConfigCenterTest ?

hey is it possible for you to pick other test ? , because I have kinda started working on it.

May I try SchemaChangedListenerTest this one?

can i try the test ConfigCenterTest ?

hey is it possible for you to pick other test ? , because I have kinda started working on it.

yeah i can pick other @sukumaar

Please ref #5629, use

@SneakyThrows
    private String readYAML(final String yamlFile) {
        return Files.readAllLines(Paths.get(ClassLoader.getSystemResource(yamlFile).toURI())).stream().map(each -> each + System.lineSeparator()).collect(Collectors.joining());
    }

to load file content

what can i do for this question?

@tomakemyself @zengzhihong, welcome

Can I try the test: OrchestrationSpringBootRegistryMasterSlaveTest

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cocodroid picture cocodroid  ·  5Comments

An0nymous0 picture An0nymous0  ·  4Comments

bx189303 picture bx189303  ·  3Comments

kenny-qiao picture kenny-qiao  ·  4Comments

hzlzz picture hzlzz  ·  4Comments