Modified: openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java?rev=1418257&r1=1418256&r2=1418257&view=diff ============================================================================== --- openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java (original) +++ openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/EarUnpackTest.java Fri Dec 7 10:27:54 2012 @@ -35,28 +35,28 @@ public class EarUnpackTest extends TestC public void test() throws Exception { final File appsDir = Files.tmpdir(); - final Assembler assembler = new Assembler(); + new Assembler(); //Self register final ConfigurationFactory factory = new ConfigurationFactory(); final File ear = new File(appsDir, "colors.ear"); { // First Version of the EAR - Map<String, Object> contents = new HashMap<String, Object>(); + final Map<String, Object> contents = new HashMap<String, Object>(); contents.put("orange.jar", Archives.jarArchive(Orange.class)); Archives.jarArchive(ear, contents); final AppInfo appInfo = factory.configureApplication(ear); - assertEquals(appInfo.ejbJars.size(), 1); + assertEquals(1, appInfo.ejbJars.size()); assertEquals("orange", appInfo.ejbJars.get(0).moduleId); } { // First Version of the EAR - Map<String, Object> contents = new HashMap<String, Object>(); + final Map<String, Object> contents = new HashMap<String, Object>(); contents.put("yellow.jar", Archives.jarArchive(Yellow.class)); Archives.jarArchive(ear, contents); final AppInfo appInfo = factory.configureApplication(ear); - assertEquals(appInfo.ejbJars.size(), 1); + assertEquals(1, appInfo.ejbJars.size()); assertEquals("yellow", appInfo.ejbJars.get(0).moduleId); }
Modified: openejb/trunk/openejb/osgi/openejb-osgi-tests/src/test/java/org/apache/openejb/osgi/test/OSGiKarafStartupTest.java URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/osgi/openejb-osgi-tests/src/test/java/org/apache/openejb/osgi/test/OSGiKarafStartupTest.java?rev=1418257&r1=1418256&r2=1418257&view=diff ============================================================================== --- openejb/trunk/openejb/osgi/openejb-osgi-tests/src/test/java/org/apache/openejb/osgi/test/OSGiKarafStartupTest.java (original) +++ openejb/trunk/openejb/osgi/openejb-osgi-tests/src/test/java/org/apache/openejb/osgi/test/OSGiKarafStartupTest.java Fri Dec 7 10:27:54 2012 @@ -17,9 +17,6 @@ package org.apache.openejb.osgi.test; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import javax.inject.Inject; import org.apache.felix.service.command.CommandProcessor; import org.apache.felix.service.command.CommandSession; import org.apache.karaf.tooling.exam.options.KarafDistributionConfigurationFilePutOption; @@ -35,6 +32,10 @@ import org.ops4j.pax.exam.junit.Configur import org.ops4j.pax.exam.junit.JUnit4TestRunner; import org.ops4j.pax.exam.junit.ProbeBuilder; +import javax.inject.Inject; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.karafDistributionConfiguration; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -58,7 +59,7 @@ public class OSGiKarafStartupTest { .frameworkUrl( maven().groupId("org.apache.openejb").artifactId("apache-karafee").versionAsInProject().type("tar.gz")) .name("Apache Karafee") - .karafVersion(System.getProperty("karaf.version")), + .karafVersion(System.getProperty("karaf.version", "2.3.0")), new KarafDistributionConfigurationFilePutOption("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", Integer.toString(NetworkUtil.getNextAvailablePort())), new KarafDistributionConfigurationFilePutOption("etc/org.apache.karaf.management.cfg", "rmiServerPort", Integer.toString(NetworkUtil.getNextAvailablePort())), felix() Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/SocketConnectionFactory.java URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/SocketConnectionFactory.java?rev=1418257&r1=1418256&r2=1418257&view=diff ============================================================================== --- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/SocketConnectionFactory.java (original) +++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/SocketConnectionFactory.java Fri Dec 7 10:27:54 2012 @@ -78,7 +78,7 @@ public class SocketConnectionFactory imp } private String[] getEnabledCipherSuites() { - String property = System.getProperty(ENABLED_CIPHER_SUITES); + final String property = System.getProperty(ENABLED_CIPHER_SUITES); if (property != null) { return property.split(","); } else { @@ -424,7 +424,7 @@ public class SocketConnectionFactory imp Thread.interrupted(); } - ConnectionPoolTimeoutException exception = new ConnectionPoolTimeoutException("No connections available in pool (size " + size + "). Waited for " + timeout + " milliseconds for a connection."); + final ConnectionPoolTimeoutException exception = new ConnectionPoolTimeoutException("No connections available in pool (size " + size + "). Waited for " + timeout + " milliseconds for a connection."); exception.fillInStackTrace(); Client.fireEvent(new ConnectionPoolTimeout(uri, size, timeout, timeUnit, exception)); throw exception;
