Author: kkolinko
Date: Sat May 12 13:20:59 2012
New Revision: 1337535

URL: http://svn.apache.org/viewvc?rev=1337535&view=rev
Log:
Merged revision 1337426 from tomcat/trunk:
In TestCometProcessor: add diagnostic message that reports whether END event 
has ever been received.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1337426

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1337535&r1=1337534&r2=1337535&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java 
Sat May 12 13:20:59 2012
@@ -309,12 +309,14 @@ public class TestCometProcessor extends 
         // Last message: [Client: END]
         // Last response line: [0] (empty chunk)
         // Last comet event: [END]
+        // END event occurred: [true]
         status.append("Status:");
         status.append("\nWriterThread exception: " + 
writeThread.getException());
         status.append("\nReaderThread exception: " + 
readThread.getException());
         status.append("\nLast message: [" + lastMessage + "]");
         status.append("\nLast response line: [" + lastResponseLine + "]");
         status.append("\nLast comet event: [" + servlet.getLastEvent() + "]");
+        status.append("\nEND event occurred: [" + 
servlet.getEndEventOccurred() + "]");
         if (writeThread.getException() == null
                 || !lastMessage.contains("Client: END")
                 || !EventType.END.equals(servlet.getLastEvent())) {
@@ -351,10 +353,16 @@ public class TestCometProcessor extends 
 
         private volatile EventType lastEvent;
 
+        private volatile boolean endEventOccurred = false;
+
         public EventType getLastEvent() {
             return lastEvent;
         }
 
+        public boolean getEndEventOccurred() {
+            return endEventOccurred;
+        }
+
         @Override
         public void init() throws ServletException {
             failOnBegin = Boolean.valueOf(getServletConfig().getInitParameter(
@@ -397,6 +405,7 @@ public class TestCometProcessor extends 
                 String msg = "READ: " + count + " bytes";
                 response.getWriter().print("Client: " + msg + "\r\n");
             } else if (event.getEventType() == EventType.END) {
+                endEventOccurred = true;
                 if (failOnEnd) {
                     throw new IOException("Fail on end");
                 }



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

Reply via email to