bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

[Test] migrate-junit5-client-module and parameterized beforeEach

Open sherlock-lin opened this issue 1 year ago • 6 comments

Main Issue: #4322

1. why parameterized beforeEach

Because the current version of Junit 5 does not support class-level parameterized, related links,We can achieve the same effect by beforeEach。

2. Short-term solutions(this pr)

Refer to this post custom ParameterResolver and beforeEach implementations class-level parameterized

3. Long-term solutions

Keep up with the Junit5 community, and when Junit5 supports class-level parameterized, go with the official Junit5 way!

Test results

image image

sherlock-lin avatar Oct 24 '24 13:10 sherlock-lin

@shoothzj please help review

sherlock-lin avatar Oct 25 '24 03:10 sherlock-lin

Overall looks good, can we use four indents in new code of bookkeeper-server/src/test/java/org/apache/bookkeeper/client/HandleFailuresTest.java?

sure😊

sherlock-lin avatar Oct 25 '24 08:10 sherlock-lin

reopen's reason: rerun failure checks

StevenLuMT avatar Feb 14 '25 08:02 StevenLuMT

CI is failing:

[INFO] 
Error:  Errors: 
Error:  org.apache.bookkeeper.client.TestMaxEnsembleChangeNum.testChangeEnsembleMaxNumWithWriter
Error:    Run 1: TestMaxEnsembleChangeNum.testChangeEnsembleMaxNumWithWriter:46->MockBookKeeperTestCase.setBookKeeperConfig:253 » NullPointer
Error:    Run 2: TestMaxEnsembleChangeNum.testChangeEnsembleMaxNumWithWriter:46->MockBookKeeperTestCase.setBookKeeperConfig:253 » NullPointer
Error:    Run 3: TestMaxEnsembleChangeNum.testChangeEnsembleMaxNumWithWriter:46->MockBookKeeperTestCase.setBookKeeperConfig:253 » NullPointer

dlg99 avatar Feb 14 '25 17:02 dlg99

reopen's reason: rerun failure checks

StevenLuMT avatar Apr 16 '25 01:04 StevenLuMT

testChangeEnsembleMaxNumWithWriter

@sherlock-lin take some time to deal with this issue.

StevenLuMT avatar May 09 '25 01:05 StevenLuMT