tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [2/4] tomee git commit: add a switch to disable multicast tests
Date Thu, 05 Mar 2015 09:52:43 GMT
add a switch to disable multicast tests

This is intended building in environments where multicast is not allowed.
In that case just build with. $> mvn clean install -DskipMulticastTests=true


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/4d9d2215
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/4d9d2215
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/4d9d2215

Branch: refs/heads/tomee-1.7.x
Commit: 4d9d2215d53667f804bf55206997fa58cd5cb6be
Parents: 6a610ba
Author: Mark Struberg <struberg@apache.org>
Authored: Thu Mar 5 09:14:03 2015 +0100
Committer: Mark Struberg <struberg@apache.org>
Committed: Thu Mar 5 09:14:03 2015 +0100

----------------------------------------------------------------------
 .../server/discovery/MulticastPulseAgentTest.java    |  9 +++++++++
 .../discovery/MultipointDiscoveryAgentTest.java      | 15 ---------------
 2 files changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/4d9d2215/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MulticastPulseAgentTest.java
----------------------------------------------------------------------
diff --git a/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MulticastPulseAgentTest.java
b/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MulticastPulseAgentTest.java
index a9d3aa4..223a768 100644
--- a/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MulticastPulseAgentTest.java
+++ b/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MulticastPulseAgentTest.java
@@ -48,6 +48,7 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.ReentrantLock;
+import java.util.logging.Logger;
 
 @SuppressWarnings("UseOfSystemOutOrSystemErr")
 public class MulticastPulseAgentTest {
@@ -96,6 +97,10 @@ public class MulticastPulseAgentTest {
      */
     @Test
     public void test() throws Exception {
+        if ("true".equals(System.getProperty("skipMulticastTests"))) {
+            Logger.getLogger(this.getClass().getName()).warning("Skipping MulticastTest "
+ this.getClass().getName());
+            return;
+        }
 
         final InetAddress ia;
 
@@ -393,6 +398,10 @@ public class MulticastPulseAgentTest {
 
     @Test
     public void testBroadcastBadUri() throws Exception {
+        if ("true".equals(System.getProperty("skipMulticastTests"))) {
+            Logger.getLogger(this.getClass().getName()).warning("Skipping MulticastTest "
+ this.getClass().getName());
+            return;
+        }
 
         final DiscoveryListener original = agent.getDiscoveryListener();
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/4d9d2215/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
----------------------------------------------------------------------
diff --git a/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
b/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
index eef2b67..4ad4df9 100644
--- a/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
+++ b/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
@@ -48,23 +48,8 @@ import java.util.logging.Logger;
  */
 public class MultipointDiscoveryAgentTest extends TestCase {
 
-//    static {
-//        final FilteredHandler consoleHandler = new FilteredHandler(new ConsoleHandler(),
new LogRecordFilter() {
-//            @Override
-//            public boolean accept(LogRecord record) {
-//                return Thread.currentThread().getName().contains("red");
-//            }
-//        });
-//        consoleHandler.setLevel(Level.FINEST);
-//
-//        final Logger logger = Logger.getLogger("OpenEJB.server.discovery");
-//        logger.addHandler(consoleHandler);
-//        logger.setLevel(Level.FINEST);
-//        logger.setUseParentHandlers(false);
-//    }
 
     public void test() throws Exception {
-//        System.setProperty("logging.level.OpenEJB.server.discovery", "debug");
 
         final URI testService = new URI("green://localhost:0");
 


Mime
View raw message