You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2024/07/25 04:48:00 UTC
[jira] [Comment Edited] (KAFKA-17195) transaction-coordinator:test failing with junit error
[ https://issues.apache.org/jira/browse/KAFKA-17195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868537#comment-17868537 ]
Chia-Ping Tsai edited comment on KAFKA-17195 at 7/25/24 4:47 AM:
-----------------------------------------------------------------
transaction module has no tests so the test task should not be invoked. However, we add the incorrect path to test scope [0] and hence gradle assume there are test files.
We should fix this issue by following steps:
1. hot-fix: remove the incorrect path ("src/generated/java") from sourceSets test scope (both transaction-coordinator and group-coordinator have same issue)
2. add tests to ` transaction-coordinator` to avoid possible issue like https://issues.apache.org/jira/browse/KAFKA-16801
[0] https://github.com/apache/kafka/blob/trunk/build.gradle#L1453
was (Author: chia7712):
transaction module has no tests so the test task should not be invoked. However, we add the incorrect path to test scope [0] and hence gradle assume there are test files.
We should fix this issue by following steps:
1. hot-fix: remove the incorrect path from sourceSets (both transaction-coordinator and group-coordinator have same issue)
2. add tests to ` transaction-coordinator` to avoid possible issue like https://issues.apache.org/jira/browse/KAFKA-16801
[0] https://github.com/apache/kafka/blob/trunk/build.gradle#L1453
> transaction-coordinator:test failing with junit error
> -----------------------------------------------------
>
> Key: KAFKA-17195
> URL: https://issues.apache.org/jira/browse/KAFKA-17195
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 3.9.0
> Reporter: Greg Harris
> Assignee: 黃竣陽
> Priority: Blocker
> Fix For: 3.9.0
>
>
> This error appears when I run `./gradlew transaction-coordinator:test`:
>
> {noformat}
> org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not start Gradle Test Executor 459.
> at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.startProcessing(SuiteTestClassProcessor.java:44)
> at java.base@21.0.3/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> at java.base@21.0.3/java.lang.reflect.Method.invoke(Method.java:580)
> at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
> at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
> at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
> at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
> at jdk.proxy1/jdk.proxy1.$Proxy2.startProcessing(Unknown Source)
> at org.gradle.api.internal.tasks.testing.worker.TestWorker$1.run(TestWorker.java:161)
> at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
> at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
> at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
> at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
> at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:119)
> at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:66)
> at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
> at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
> Caused by: org.junit.platform.commons.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
> at app//org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:296)
> at app//org.junit.platform.launcher.core.DefaultLauncher.<init>(DefaultLauncher.java:55)
> at app//org.junit.platform.launcher.core.LauncherFactory.createDefaultLauncher(LauncherFactory.java:134)
> at app//org.junit.platform.launcher.core.LauncherFactory.openSession(LauncherFactory.java:98)
> at app//org.junit.platform.launcher.core.LauncherFactory.openSession(LauncherFactory.java:82)
> at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$BackwardsCompatibleLauncherSession.open(JUnitPlatformTestClassProcessor.java:318)
> at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.createTestExecutor(JUnitPlatformTestClassProcessor.java:81)
> at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.startProcessing(AbstractJUnitTestClassProcessor.java:50)
> at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.startProcessing(SuiteTestClassProcessor.java:42)
> ... 16 more{noformat}
> This appears to have been introduced by [https://github.com/apache/kafka/pull/16019]
> The error appears as a failed test pre-merge, with a message like "Gradle Test Executor 3. failed to execute tests"
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)