Skip to content
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

KafkaDevServicesContinuousTestingWorkingAppPropsTestCase / PriceResourceET do not indicate recovery is tested, logs with test errors #24378

Closed
rsvoboda opened this issue Mar 17, 2022 · 7 comments · Fixed by #43427
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@rsvoboda
Copy link
Member

Describe the bug

KafkaDevServicesContinuousTestingWorkingAppPropsTestCase / PriceResourceET do not indicate recovery is tested, logs with test errors

When I executed KafkaDevServicesContinuousTestingWorkingAppPropsTestCase I thought there is a hidden issue and talked to @cescoffier about it.

Clement Escoffier: the error is actually expected, because we introduce an invalid configuration
Clement Escoffier: and we test that we can recover

Clement Escoffier: Yes, we should change the name of the test.
Clement Escoffier: can you open an issue and assign it to Ozan?

PriceResourceET and the test method should be renamed to indicate recovery / invalid setup is tested.
Maybe there could be Invalid Configuration keyword somewhere, or Recovery keyword

Expected behavior

Test method or test name indicate that logged error is expected as the test is testing recovery scenario

Actual behavior

Test name is PriceResourceET#sseStream(), no indication from random people that it's expected to see things like

2022-03-17 14:31:25,336 INFO  [io.quarkus] (Test runner thread) Quarkus(test application) stopped in 0.117s
2022-03-17 14:31:25,365 ERROR [io.qua.test] (Test runner thread) ==================== TEST REPORT #1 ====================
2022-03-17 14:31:25,366 ERROR [io.qua.test] (Test runner thread) Test PriceResourceET#sseStream() failed
: org.junit.jupiter.api.extension.TestInstantiationException: Failed to create test instance
        at io.quarkus.test.junit.QuarkusTestExtension.initTestState(QuarkusTestExtension.java:797)
        at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:751)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:73)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:355)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:302)
        at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:280)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272)
        at java.base/java.util.Optional.orElseGet(Optional.java:369)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271)
        at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
        at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
        at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95)
        at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91)
        at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60)
        at io.quarkus.deployment.dev.testing.JunitTestRunner$2.run(JunitTestRunner.java:225)
        at io.quarkus.deployment.dev.testing.ModuleTestRunner$2.run(ModuleTestRunner.java:92)
        at io.quarkus.deployment.dev.testing.TestSupport.runInternal(TestSupport.java:388)
        at io.quarkus.deployment.dev.testing.TestSupport$2.run(TestSupport.java:308)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Could not determine the endpoint path for class io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.PriceResource to inject java.net.URI io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.PriceResourceET.uri
        at io.quarkus.test.common.http.TestHTTPResourceManager.inject(TestHTTPResourceManager.java:71)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.quarkus.test.junit.QuarkusTestExtension.initTestState(QuarkusTestExtension.java:781)
        ... 64 more
 
2022-03-17 14:31:25,370 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 1 TEST FAILED <<<<<<<<<<<<<<<<<<<<

How to Reproduce?

Use Quarkus main

Run mvn clean install -pl extensions/smallrye-reactive-messaging-kafka/deployment -Dtest-containers -Dstart-containers -am -Dtest=KafkaDevServicesContinuousTestingWorkingAppPropsTestCase -DfailIfNoTests=false

Output of uname -a or ver

macOS Monterey

Output of java -version

Java 11

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Quarkus main

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@rsvoboda rsvoboda added the kind/bug Something isn't working label Mar 17, 2022
@geoand
Copy link
Contributor

geoand commented Sep 20, 2024

Is this still an issue?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label Sep 20, 2024
@rsvoboda
Copy link
Member Author

This one is funny :)

mvn clean verify -pl extensions/smallrye-reactive-messaging-kafka/deployment -Dstart-containers passes, but ...

Running PriceResourceET ends with error

mvn clean verify -pl extensions/smallrye-reactive-messaging-kafka/deployment -Dstart-containers -Dtest=PriceResourceET
...
[ERROR]   PriceResourceET.sseStream » Runtime java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.smallrye.reactivemessaging.deployment.SmallRyeReactiveMessagingProcessor#build threw an exception: jakarta.enterprise.inject.spi.DefinitionException: SRMSG00051: Invalid method annotated with @Incoming: io.quarkus.smallrye.reactivemessaging.kafka.deployment.ReflectiveClassForValueSerializerPayloadTest$JacksonDtoSerde#incoming1 - The signature is not supported. The method consumes a `Message`, so the returned type must be `CompletionStage<Void>` or `Uni<Void>`.
	at io.smallrye.reactive.messaging.providers.MediatorConfigurationSupport.validateSubscriber(MediatorConfigurationSupport.java:209)
	at io.smallrye.reactive.messaging.providers.MediatorConfigurationSupport.validate(MediatorConfigurationSupport.java:97)
	at io.quarkus.smallrye.reactivemessaging.deployment.QuarkusMediatorConfigurationUtil.create(QuarkusMediatorConfigurationUtil.java:140)
	at io.quarkus.smallrye.reactivemessaging.deployment.SmallRyeReactiveMessagingProcessor.build(SmallRyeReactiveMessagingProcessor.java:310)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

These tests were initially added in 76939af

@geoand / @cescoffier drop it / fix it ?

@geoand geoand removed the triage/needs-feedback We are waiting for feedback. label Sep 20, 2024
@geoand
Copy link
Contributor

geoand commented Sep 20, 2024

I would say we should fix it if possible.

@cescoffier
Copy link
Member

You cannot run the ET test - it's the test ran during the continuous testing "test" (which is disabled)

@cescoffier
Copy link
Member

cescoffier commented Sep 20, 2024

In my case, the flakiness comes from Apicurio, which starts 50% of the time. (on my machine)

@geoand
Copy link
Contributor

geoand commented Sep 20, 2024

@cescoffier are you talking about #23916?

@cescoffier
Copy link
Member

Most probably yes, it seems random .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants