diff --git a/instrumentation/kamon-apache-cxf/src/test/scala/kamon/instrumentation/apache/cxf/client/MessageSpec.scala b/instrumentation/kamon-apache-cxf/src/test/scala/kamon/instrumentation/apache/cxf/client/MessageSpec.scala index 9ddf9c379..613a64ef8 100644 --- a/instrumentation/kamon-apache-cxf/src/test/scala/kamon/instrumentation/apache/cxf/client/MessageSpec.scala +++ b/instrumentation/kamon-apache-cxf/src/test/scala/kamon/instrumentation/apache/cxf/client/MessageSpec.scala @@ -91,7 +91,8 @@ class MessageSpec } override val container: MockServerContainer = MockServerContainer() - lazy val clientExpectation: MockServerExpectations = new MockServerExpectations("localhost", container.serverPort) + lazy val clientExpectation: MockServerExpectations = + new MockServerExpectations(container.container.getHost, container.serverPort) override protected def beforeAll(): Unit = { super.beforeAll() diff --git a/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpRequestSpec.scala b/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpRequestSpec.scala index 729d65e58..3a221deb6 100644 --- a/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpRequestSpec.scala +++ b/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpRequestSpec.scala @@ -161,7 +161,8 @@ class HttpRequestSpec } override val container: MockServerContainer = MockServerContainer() - lazy val clientExpectation: MockServerExpectations = new MockServerExpectations("localhost", container.serverPort) + lazy val clientExpectation: MockServerExpectations = + new MockServerExpectations(container.container.getHost, container.serverPort) override protected def beforeAll(): Unit = { super.beforeAll() diff --git a/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpUriRequestSpec.scala b/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpUriRequestSpec.scala index 1eadbed25..a0daa250d 100644 --- a/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpUriRequestSpec.scala +++ b/instrumentation/kamon-apache-httpclient/src/test/scala/kamon/instrumentation/apache/httpclient/HttpUriRequestSpec.scala @@ -156,7 +156,8 @@ class HttpUriRequestSpec } override val container: MockServerContainer = MockServerContainer() - lazy val clientExpectation: MockServerExpectations = new MockServerExpectations("localhost", container.serverPort) + lazy val clientExpectation: MockServerExpectations = + new MockServerExpectations(container.container.getHost, container.serverPort) override protected def beforeAll(): Unit = { super.beforeAll()