-
Notifications
You must be signed in to change notification settings - Fork 51
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
Ensure decaton works with older jdk #225
Conversation
ocadaruma
commented
Mar 6, 2024
•
edited
Loading
edited
- Now Decaton compiles only on jdk >= 21 (by Add virtual threads support #224) but since there are many users who still use jdk 8,11,17, we still should run tests on these versions
@@ -39,8 +39,7 @@ | |||
|
|||
@ExtendWith(MockitoExtension.class) | |||
public class DecatonClientTest { | |||
@Spy | |||
private final DecatonClient<HelloTask> decaton = new DecatonClient<HelloTask>() { | |||
private static class NoopClient implements DecatonClient<HelloTask> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spying anonymous class fails on JDK8 with reflection error
https://github.com/line/decaton/actions/runs/8174863099/job/22350646261
I didn't want to dig into the detail as we likely drop JDK8-support in not-so-far-future so I just rewrote it with static class for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one minor question
distribution: temurin | ||
java-version: | | ||
${{ matrix.java }} | ||
21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentionally left or just forgot to remove line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally. We need to install 21 always to build the project, regardless test-jdk version.
Last one will be used as the global java version (refs: https://github.com/actions/setup-java?tab=readme-ov-file#install-multiple-jdks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah-ok. now understand how it works
@@ -33,6 +35,7 @@ | |||
import com.linecorp.decaton.testing.RandomExtension; | |||
import com.linecorp.decaton.testing.processor.ProcessorTestSuite; | |||
|
|||
@EnabledForJreRange(min = JRE.JAVA_21) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... there's such a convenient annotation existed... !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the quick follow-up!