tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [16/50] tomee git commit: add a switch to disable multicast tests
Date Wed, 11 Mar 2015 11:56:32 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/b9623bd9
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b9623bd9
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b9623bd9

Branch: refs/heads/master
Commit: b9623bd982fdcd4f133680d4b3121e696b1c6627
Parents: 8fa8097
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 11:53:04 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/b9623bd9/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/b9623bd9/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 d711b7b..54b4b98 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