tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1511659 - /tomee/tomee/trunk/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
Date Thu, 08 Aug 2013 09:51:36 GMT
Author: andygumbrecht
Date: Thu Aug  8 09:51:35 2013
New Revision: 1511659

URL: http://svn.apache.org/r1511659
Log:
Do more work

Modified:
    tomee/tomee/trunk/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java

Modified: tomee/tomee/trunk/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java?rev=1511659&r1=1511658&r2=1511659&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
(original)
+++ tomee/tomee/trunk/itests/legacy-client/src/test/java/org/apache/openejb/itest/legacy/LegacyClientTest.java
Thu Aug  8 09:51:35 2013
@@ -66,8 +66,8 @@ public class LegacyClientTest {
     @Test
     public void test() throws Exception {
 
-//        To run in an IDE, uncomment and update this line
-//        System.setProperty("version", OpenEjbVersion.get().getVersion());
+        //        To run in an IDE, uncomment and update this line
+        //        System.setProperty("version", OpenEjbVersion.get().getVersion());
         System.setProperty("openejb.client.connection.strategy", "roundrobin");
 
         logger.info("Retrieving standalone server: " + Repository.guessVersion("org.apache.openejb",
"openejb-standalone"));
@@ -145,7 +145,6 @@ public class LegacyClientTest {
             server.start(1, TimeUnit.MINUTES);
         }
 
-
         System.setProperty("openejb.client.requestretry", "true");
         System.setProperty("openejb.client.connection.strategy", "random");
 
@@ -186,7 +185,6 @@ public class LegacyClientTest {
             // good
         }
 
-
         for (final Map.Entry<String, StandaloneServer> entry : servers.entrySet())
{
             final String name = entry.getKey();
             final StandaloneServer server = entry.getValue();
@@ -210,7 +208,6 @@ public class LegacyClientTest {
         final double percent = 0.10;
         final int totalInvocations = size * expectedInvocations;
 
-
         // Verify the work reached all servers
         final Set<Map.Entry<String, AtomicInteger>> entries = invoke(bean, totalInvocations).entrySet();
 
@@ -225,7 +222,6 @@ public class LegacyClientTest {
         }
     }
 
-
     private Map<String, AtomicInteger> invoke(final Calculator bean, final int max)
{
         final Map<String, AtomicInteger> invocations = new HashMap<String, AtomicInteger>();
         for (int i = 0; i < max; i++) {
@@ -246,6 +242,7 @@ public class LegacyClientTest {
     }
 
     public static class Services {
+
         static final Logger logger = Logger.getLogger(Services.class.getName());
 
         private final ReentrantLock lock = new ReentrantLock();
@@ -285,7 +282,9 @@ public class LegacyClientTest {
         public Set<URI> diff(final Set<URI> a, final Set<URI> b) {
             final Set<URI> diffs = new HashSet<URI>();
             for (final URI uri : b) {
-                if (!a.contains(uri)) diffs.add(uri);
+                if (!a.contains(uri)) {
+                    diffs.add(uri);
+                }
             }
 
             return diffs;
@@ -320,6 +319,7 @@ public class LegacyClientTest {
     }
 
     private static class CalculatorCallable implements Callable {
+
         private final Calculator bean;
 
         public CalculatorCallable(final Calculator bean) {
@@ -328,6 +328,7 @@ public class LegacyClientTest {
 
         @Override
         public Object call() throws Exception {
+            Assert.assertEquals(3, bean.sum(1, 2));
             return bean.name();
         }
     }



Mime
View raw message