eventuate-tram/eventuate-tram-core

Reactive tests must always block(timeout) NOT mono.block()

cer opened this issue · 0 comments

cer commented

Some strange error caused the test to hang indefinitely:

16:21:12.038 [Test worker] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
�����16:21:12.043 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
16:21:12.053 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
16:21:12.078 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]
16:21:12.093 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest], using SpringBootContextLoader
�����16:21:12.096 [Test worker] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]: class path resource [io/eventuate/tram/spring/reactive/consumer/jdbc/EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest-context.xml] does not exist
�����16:21:12.097 [Test worker] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]: class path resource [io/eventuate/tram/spring/reactive/consumer/jdbc/EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTestContext.groovy] does not exist
16:21:12.097 [Test worker] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]: no resource found for suffixes {-context.xml, Context.groovy}.
16:21:12.126 [Test worker] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
16:21:12.210 [Test worker] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]: using defaults.
����	16:21:12.211 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
�����16:21:12.221 [Test worker] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Skipping candidate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener] due to a missing dependency. Specify custom listener classes or make the default listener classes and their required dependencies available. Offending class: [javax.servlet.ServletContext]
����	16:21:12.228 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@604e32cc, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@a8aad0d9, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@f3b36e96, org.springframework.test.context.support.DirtiesContextTestExecutionListener@bbf498ce, org.springframework.test.context.transaction.TransactionalTestExecutionListener@9307b3f5, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@93b831ef, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@7cf2c137, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@176f8356, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@f19d4cc3, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@e4ee7698, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@26c01a7e]
16:21:12.230 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
16:21:12.231 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
16:21:12.232 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
16:21:12.232 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
����
16:21:12.235 [Test worker] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@8c3c839a testClass = EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [MergedContextConfiguration@2df3a7f testClass = EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest, locations = '{}', classes = '{class io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest$Config, class io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest$Config}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@44369a49, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@82dc21d7, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@9745dc7f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@5a9230cf], contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map[[empty]]], class annotated with @DirtiesContext [false] with mode [null].
16:21:12.236 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
16:21:12.236 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest]
�����16:21:12.242 [Test worker] DEBUG org.springframework.test.context.support.DependencyInjectionTestExecutionListener - Performing dependency injection for test context [[DefaultTestContext@8c3c839a testClass = EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest, testInstance = io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest@af411f85, testMethod = [null], testException = [null], mergedContextConfiguration = [MergedContextConfiguration@2df3a7f testClass = EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest, locations = '{}', classes = '{class io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest$Config, class io.eventuate.tram.spring.reactive.consumer.jdbc.EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest$Config}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@44369a49, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@82dc21d7, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@9745dc7f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@5a9230cf], contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map[[empty]]]].
16:21:12.264 [Test worker] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=-1}
����
���(  .   ____          _            __ _ _
���) /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
���*( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
���+ \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
���*  '  |____| .__|_| |_|_| |_\__, | / / / /
���) =========|_|==============|___/=/_/_/_/
���+ :: Spring Boot ::        (v2.1.1.RELEASE)
����
2021-08-10 16:21:12.437  INFO 62368 --- [    Test worker] qlTableBasedDuplicateMessageDetectorTest : Starting EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest on Chriss-iMac-Pro.local with PID 62368 (started by cer in /Users/cer/src/eventuate/eventuate-tram-core/eventuate-tram-spring-reactive-consumer-jdbc)
�����2021-08-10 16:21:12.438  INFO 62368 --- [    Test worker] qlTableBasedDuplicateMessageDetectorTest : No active profile set, falling back to default profiles: default
�����2021-08-10 16:21:13.133  INFO 62368 --- [    Test worker] qlTableBasedDuplicateMessageDetectorTest : Started EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest in 0.867803528 seconds (JVM running for 1.399)
�����2021-08-10 16:21:13.634 ERROR 62368 --- [actor-tcp-nio-1] r.n.channel.ChannelOperationsHandler     : [id: 0x15a6834f, L:/127.0.0.1:55731 - R:localhost/127.0.0.1:3306] Error was received while reading the incoming data. The connection will be closed.
����
���Ujava.lang.IncompatibleClassChangeError: org/reactivestreams/Subscriber.onComplete()V
���_	at dev.miku.r2dbc.mysql.MySqlResult$$Lambda$428/00000000FED3FD70.run(Unknown Source) ~[na:na]
���r	at reactor.core.publisher.LambdaSubscriber.onComplete(LambdaSubscriber.java:132) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowFlux.checkTerminated(FluxWindowPredicate.java:765) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:659) ~[reactor-core-3.4.5.jar:3.4.5]
���~	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:745) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowFlux.onComplete(FluxWindowPredicate.java:811) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowPredicateMain.onNext(FluxWindowPredicate.java:241) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:184) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) ~[reactor-core-3.4.5.jar:3.4.5]
    at dev.miku.r2dbc.mysql.util.DiscardOnCancelSubscriber.onNext(DiscardOnCancelSubscriber.java:70) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[reactor-core-3.4.5.jar:3.4.5]
���}	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:250) ~[reactor-core-3.4.5.jar:3.4.5]
���m	at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:199) ~[reactor-core-3.4.5.jar:3.4.5]
���s	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:118) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[reactor-core-3.4.5.jar:3.4.5]
���m	at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:491) ~[reactor-core-3.4.5.jar:3.4.5]
���s	at reactor.core.publisher.EmitterProcessor.tryEmitNext(EmitterProcessor.java:299) ~[reactor-core-3.4.5.jar:3.4.5]
���o	at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27) ~[reactor-core-3.4.5.jar:3.4.5]
���n	at reactor.core.publisher.EmitterProcessor.onNext(EmitterProcessor.java:265) ~[reactor-core-3.4.5.jar:3.4.5]
    at dev.miku.r2dbc.mysql.client.ReactorNettyClient$ResponseSink.next(ReactorNettyClient.java:340) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at dev.miku.r2dbc.mysql.client.ReactorNettyClient.lambda$new$0(ReactorNettyClient.java:103) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
���p	at dev.miku.r2dbc.mysql.client.ReactorNettyClient$$Lambda$359/00000000EF038220.accept(Unknown Source) ~[na:na]
���m	at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:184) ~[reactor-core-3.4.5.jar:3.4.5]
���{	at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:219) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
���{	at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:353) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
    at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:353) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
    at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:96) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.handleDecoded(MessageDuplexCodec.java:187) [r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.channelRead(MessageDuplexCodec.java:95) [r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [netty-codec-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) [netty-codec-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
���q	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.50.Final.jar:4.1.50.Final]
���{	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.50.Final.jar:4.1.50.Final]
���9	at java.lang.Thread.run(Thread.java:821) [na:1.8.0_242]