Browse Source

Simplify test (#11339)

Lauri Tulmin 10 months ago
parent
commit
03770f371f

+ 0 - 2
instrumentation/spring/spring-rmi-4.0/javaagent/build.gradle.kts

@@ -21,8 +21,6 @@ dependencies {
   library("org.springframework:spring-aop:4.0.0.RELEASE")
   testLibrary("org.springframework.boot:spring-boot:1.1.0.RELEASE")
   testImplementation("org.apache.tomee:openejb-core:8.0.16")
-  testImplementation("org.apache.tomee:openejb-ejbd:8.0.16")
-  testImplementation("org.apache.tomee:openejb-client:8.0.16")
 
   // rmi remoting was removed in spring 6
   latestDepTestLibrary("org.springframework:spring-context:5.+") // documented limitation

+ 0 - 6
instrumentation/spring/spring-rmi-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/rmi/v4_0/SpringRmiTest.java

@@ -26,9 +26,6 @@ import java.util.Map;
 import java.util.function.Consumer;
 import javax.ejb.EJBException;
 import javax.ejb.embeddable.EJBContainer;
-import javax.naming.spi.NamingManager;
-import org.apache.openejb.OpenEjbContainer;
-import org.apache.openejb.client.RemoteInitialContextFactory;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -92,10 +89,7 @@ class SpringRmiTest {
     Map<String, Object> map = new HashMap<>();
     map.put(EJBContainer.APP_NAME, "test");
     map.put(EJBContainer.MODULES, new java.io.File("build/classes/java/test"));
-    map.put(OpenEjbContainer.OPENEJB_EMBEDDED_REMOTABLE, "true");
     ejbContainer = EJBContainer.createEJBContainer(map);
-    // needed to ensure that remote ejb call isn't optimized to a local call
-    NamingManager.setInitialContextFactoryBuilder(environment -> new RemoteInitialContextFactory());
 
     Map<String, Object> props = new HashMap<>();
     props.put("spring.jmx.enabled", false);