diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/EJBUtil.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/EJBUtil.java index ba87984ce88b..e89415e5a1a3 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/EJBUtil.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/EJBUtil.java @@ -22,7 +22,6 @@ package org.jboss.as.test.integration.ejb.remote.security; import java.net.UnknownHostException; -import java.util.Hashtable; import java.util.Properties; import javax.naming.Context; @@ -48,12 +47,14 @@ class EJBUtil { * * @param beanImplClass * @param remoteInterface + * @param ejbProperties * @return * @throws NamingException */ @SuppressWarnings("unchecked") - public static T lookupEJB(Class beanImplClass, Class remoteInterface) throws NamingException { - final Hashtable jndiProperties = new Hashtable(); + public static T lookupEJB(Class beanImplClass, Class remoteInterface, Properties ejbProperties) throws Exception { + final Properties jndiProperties = new Properties(); + jndiProperties.putAll(ejbProperties); jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); // jndiProperties.put("jboss.naming.client.ejb.context", "true"); final Context context = new InitialContext(jndiProperties); diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/RemoteIdentityTestCase.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/RemoteIdentityTestCase.java index dab08090a5ce..7f29f290dd7c 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/RemoteIdentityTestCase.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/remote/security/RemoteIdentityTestCase.java @@ -66,10 +66,7 @@ public static JavaArchive createDeployment() throws IOException { @Test public void testDirect() throws Exception { final Properties ejbClientConfiguration = EJBUtil.createEjbClientConfiguration(Utils.getHost(mgmtClient)); - // TODO Elytron: Once support for legacy EJB properties has been added back, actually set the EJB properties - // that should be used for this test using ejbClientConfiguration - - final SecurityInformation targetBean = EJBUtil.lookupEJB(SecuredBean.class, SecurityInformation.class); + final SecurityInformation targetBean = EJBUtil.lookupEJB(SecuredBean.class, SecurityInformation.class, ejbClientConfiguration); assertEquals("guest", targetBean.getPrincipalName()); } @@ -77,10 +74,7 @@ public void testDirect() throws Exception { @Test public void testUnsecured() throws Exception { final Properties ejbClientConfiguration = EJBUtil.createEjbClientConfiguration(Utils.getHost(mgmtClient)); - // TODO Elytron: Once support for legacy EJB properties has been added back, actually set the EJB properties - // that should be used for this test using ejbClientConfiguration - - final IntermediateAccess targetBean = EJBUtil.lookupEJB(EntryBean.class, IntermediateAccess.class); + final IntermediateAccess targetBean = EJBUtil.lookupEJB(EntryBean.class, IntermediateAccess.class, ejbClientConfiguration); assertEquals("anonymous", targetBean.getPrincipalName()); } @@ -88,10 +82,7 @@ public void testUnsecured() throws Exception { @Test public void testSwitched() throws Exception { final Properties ejbClientConfiguration = EJBUtil.createEjbClientConfiguration(Utils.getHost(mgmtClient)); - // TODO Elytron: Once support for legacy EJB properties has been added back, actually set the EJB properties - // that should be used for this test using ejbClientConfiguration - - final IntermediateAccess targetBean = EJBUtil.lookupEJB(EntryBean.class, IntermediateAccess.class); + final IntermediateAccess targetBean = EJBUtil.lookupEJB(EntryBean.class, IntermediateAccess.class, ejbClientConfiguration); assertEquals("user1", targetBean.getPrincipalName("user1", "password1")); } @@ -99,10 +90,7 @@ public void testSwitched() throws Exception { @Test public void testNotSwitched() throws Exception { final Properties ejbClientConfiguration = EJBUtil.createEjbClientConfiguration(Utils.getHost(mgmtClient)); - // TODO Elytron: Once support for legacy EJB properties has been added back, actually set the EJB properties - // that should be used for this test using ejbClientConfiguration - - final IntermediateAccess targetBean = EJBUtil.lookupEJB(EntryBean.class, IntermediateAccess.class); + final IntermediateAccess targetBean = EJBUtil.lookupEJB(EntryBean.class, IntermediateAccess.class, ejbClientConfiguration); assertEquals("guest", targetBean.getPrincipalName(null, null)); }