You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/03/15 23:55:11 UTC

svn commit: r1577944 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Author: kkolinko
Date: Sat Mar 15 22:55:11 2014
New Revision: 1577944

URL: http://svn.apache.org/r1577944
Log:
Better reporting for skipped tests.
With org.junit.Assume the tests are clearly reported as 'skipped' in JUnit test run summary.

Modified:
    tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1577944&r1=1577943&r2=1577944&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java Sat Mar 15 22:55:11 2014
@@ -42,6 +42,7 @@ import javax.websocket.server.ServerEndp
 import javax.websocket.server.ServerEndpointConfig;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -388,6 +389,11 @@ public class TestWsWebSocketContainer ex
     private void doTestWriteTimeoutServer(boolean setTimeoutOnContainer)
             throws Exception {
 
+        // This will never work for BIO
+        Assume.assumeFalse(
+                "Skipping test. This feature will never work for BIO connector.",
+                getProtocol().equals(Http11Protocol.class.getName()));
+
         /*
          * Note: There are all sorts of horrible uses of statics in this test
          *       because the API uses classes and the tests really need access
@@ -397,11 +403,6 @@ public class TestWsWebSocketContainer ex
 
         Tomcat tomcat = getTomcatInstance();
 
-        if (getProtocol().equals(Http11Protocol.class.getName())) {
-            // This will never work for BIO
-            return;
-        }
-
         // Must have a real docBase - just use temp
         Context ctx =
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org