cubefs / compass

Compass is a task diagnosis platform for bigdata
Apache License 2.0
348 stars 131 forks source link

[Enhancement]: Remove redundant SpringBootTest to speed up running tests. #113

Open wForget opened 12 months ago

wForget commented 12 months ago

Contact Details

No response

Is there an existing issue for this?

What would you like to be added?

It is not necessary to use @SpringBootTest in some test cases, like com.oppo.cloud.parser.spark.eventlog.ReplayEventLogsTest. We can remove it to speed up running tests

Why is this needed?

No response

Anything else?

No response

packyan commented 12 months ago

Perhaps we need to remove everything about SpringBoot from each LogParser firstly, before we remove @SpringBootTest in tests.

zebozhuang commented 12 months ago

Perhaps we need to remove everything about SpringBoot from each LogParser firstly, before we remove @SpringBootTest in tests.

Hmm..., that means we have to reconstruct bootstrap logic. Some code can be run without @SprintBootTest, If we can remove everything about SpringBoot from LogParser, we can reduce many dependencies and make LogParser more flexible, easier to extend and easier to use by other scenarios.

zebozhuang commented 12 months ago

Perhaps we need to remove everything about SpringBoot from each LogParser firstly, before we remove @SpringBootTest in tests.

We can move the core code of LogParser to another module without SpringBoot, but the bootstrap of the code just invokes the entries of the core code