ktor
ktor copied to clipboard
KTOR-4695 Fix UnixSocketAddress.path
Subsystem ktor-network
Motivation Fixes a regression in the JVM version of UnixSocketAddress (cf KTOR-4695)
Solution
Simply give the right object to the call to getPath.invoke()
.
I think, that may be ktor-team need to setup testing all ktor codebase on JDK 8, 11 and 17 (not sure, if it's possible on infra). ping @e5l
Thanks, will take a look!
Whoops, looks like this is my fault. Silly mistake when moving the code and I forgot to change this
. I am not sure why the tests didn't pick this up when I modified this, or maybe there isn't a test for this. Also not using the unix sockets myself so didn't notice in my own tests. Sorry for the inconvenience. The PR looks good to me.
@Thomas-Vos Well, it happens! :)
There is a coarse testEchoOverUnixSockets
test in ktor-network/jvmAndNix/test/io/ktor/network/sockets/tests/TcpSocketTest.kt
that only runs on JDK 16+ (as it is guarded by an if (!supportsUnixDomainSockets())
). But it doesn't seem to run on the CI.
Also, there are no simple unit test for the creation of SocketAddress
objects, nor for the access of their properties. @e5l should I add some?