This repository was archived by the owner on May 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
WebClientOptionsInject failure #18
Copy link
Copy link
Open
Description
Dear sirs
I just follow the example in the document
@ExtendWith(VertxExtension::class)
class LocalhostTest {
// Define the WebClient options
@WebClientOptionsInject
var options = WebClientOptions()
.setDefaultHost("google.com")
.setDefaultPort(9000)
@Test
fun testLocalhost(vertx: Vertx, testContext: VertxTestContext?, client: WebClient?) {
testRequest(client, HttpMethod.GET, "/path")
.expect(statusCode(200), statusMessage("Ciao!"))
.send(testContext)
}
}
But I cannot inject the host and port. Connection refused: localhost/127.0.0.1:80
Connection refused: localhost/127.0.0.1:80
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:80
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:944)
Metadata
Metadata
Assignees
Labels
No labels