Skip to content

Commit 2075314

Browse files
committed
remove connection test + fixed port mapping
1 parent f213ecd commit 2075314

File tree

2 files changed

+0
-117
lines changed

2 files changed

+0
-117
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/JmxConnectorBuilderTest.java

Lines changed: 0 additions & 95 deletions
This file was deleted.

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/TestAppContainer.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,6 @@ public TestAppContainer withUserAuth(String login, String pwd) {
6161
return this;
6262
}
6363

64-
/**
65-
* Configures app container for host-to-container access, port will be used as-is from host to
66-
* work-around JMX in docker. This is optional on Linux as there is a network route and the
67-
* container is accessible, but not on Mac where the container runs in an isolated VM.
68-
*
69-
* @param port port to use, must be available on host.
70-
* @return this
71-
*/
72-
@CanIgnoreReturnValue
73-
public TestAppContainer withHostAccessFixedJmxPort(int port) {
74-
// To get host->container JMX connection working docker must expose JMX/RMI port under the same
75-
// port number. Because of this testcontainers' standard exposed port randomization approach
76-
// can't be used.
77-
// Explanation:
78-
// https://forums.docker.com/t/exposing-mapped-jmx-ports-from-multiple-containers/5287/6
79-
properties.put("com.sun.management.jmxremote.port", Integer.toString(port));
80-
properties.put("com.sun.management.jmxremote.rmi.port", Integer.toString(port));
81-
properties.put("java.rmi.server.hostname", getHost());
82-
addFixedExposedPort(port, port);
83-
return this;
84-
}
85-
8664
@Override
8765
public void start() {
8866
// TODO: add support for ssl

0 commit comments

Comments
 (0)