-
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
Changes from all commits
d64bab5
8368ccd
01bb60f
132b103
475e3f2
91f700a
11b4e46
cf1cdc6
9c097d9
ec0e6ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Spying anonymous class fails on JDK8 with reflection error 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. |
||
@Override | ||
public CompletableFuture<PutTaskResult> put(String key, HelloTask task) { | ||
return null; | ||
|
@@ -73,7 +72,10 @@ public CompletableFuture<PutTaskResult> put(String key, HelloTask task, | |
public void close() throws Exception { | ||
// noop | ||
} | ||
}; | ||
} | ||
|
||
@Spy | ||
private final DecatonClient<HelloTask> decaton = new NoopClient(); | ||
|
||
@Test | ||
public void testPutAsyncHelperOnSuccess() throws Exception { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.Timeout; | ||
import org.junit.jupiter.api.condition.EnabledForJreRange; | ||
import org.junit.jupiter.api.condition.JRE; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import com.linecorp.decaton.processor.runtime.ProcessorProperties; | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Oh... there's such a convenient annotation existed... ! |
||
public class VThreadCoreFunctionalityTest { | ||
@RegisterExtension | ||
public static KafkaClusterExtension rule = new KafkaClusterExtension(); | ||
|
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