with
extends ScalaTestWithActorTestKit(ConfigFactory.parseString("""
// akka.persistence.testkit.events.serialize = off
// akka {
// remote {
// artery.enabled = on
// artery.transport = aeron-udp
// artery.canonical.port = 0
// artery.canonical.hostname = localhost
// }
// }
"""))
which is just an empty config, I got the following error in my test using ScalaTestWithActorTestKit
[2021-02-08 23:12:45,054] [ERROR] [akka.remote.artery.aeron.ArteryAeronUdpTransport] [] [my-app-akka.actor.default-dispatcher-6] - Aeron error: 1 observations from 02/08/2021 23:12:45.043 to 02/08/2021 23:12:45.043 for:
io.aeron.exceptions.AeronException: ERROR - channel error - Address already in use (at java.base/sun.nio.ch.Net.bind0(Native Method)): aeron:udp?endpoint=127.0.0.1:2552
at io.aeron.driver.media.UdpChannelTransport.openDatagramChannel(UdpChannelTransport.java:167)
at io.aeron.driver.media.ReceiveChannelEndpoint.openChannel(ReceiveChannelEndpoint.java:240)
at io.aeron.driver.Receiver.onRegisterReceiveChannelEndpoint(Receiver.java:156)
at io.aeron.driver.ReceiverProxy.lambda$registerReceiveChannelEndpoint$5(ReceiverProxy.java:126)
at org.agrona.concurrent.OneToOneConcurrentArrayQueue.drain(OneToOneConcurrentArrayQueue.java:116)
at io.aeron.driver.Receiver.doWork(Receiver.java:77)
at org.agrona.concurrent.CompositeAgent.doWork(CompositeAgent.java:114)
at org.agrona.concurrent.AgentRunner.doDutyCycle(AgentRunner.java:291)
at org.agrona.concurrent.AgentRunner.run(AgentRunner.java:164)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:455)
at java.base/sun.nio.ch.DatagramChannelImpl.bindInternal(DatagramChannelImpl.java:814)
at java.base/sun.nio.ch.DatagramChannelImpl.bind(DatagramChannelImpl.java:785)
at io.aeron.driver.media.UdpChannelTransport.openDatagramChannel(UdpChannelTransport.java:127)
... 9 more
and
akka.remote.RemoteTransportException was thrown inside "my-test" when, construction cannot continue: "Inbound Aeron channel is in errored state. See Aeron logs for details."
I was expecting it to work out of the box. what config do I need to pass to ScalaTestWithActorTestKit
?
5 posts - 1 participant