Save This Page
Home » cactus-1.8.0-src » org.apache.cactus.sample.servlet.unit » [javadoc | source]
org.apache.cactus.sample.servlet.unit
public class: TestClientServerSynchronization [javadoc | source]
java.lang.Object
   junit.framework.TestCase
      org.apache.cactus.internal.AbstractCactusTestCase
         org.apache.cactus.ServletTestCase
            org.apache.cactus.sample.servlet.unit.TestClientServerSynchronization

All Implemented Interfaces:
    CactusTestCase

Verify that the Cactus client side only reads the test result *after* the test is finished (ie after the test result has been saved in the application scope). This JUnit test need to be the first one to be run. Otherwise, the test result might be that of the previous test and not the current test one, thus proving nothing !!
Fields inherited from org.apache.cactus.ServletTestCase:
request,  response,  session,  config
Method from org.apache.cactus.sample.servlet.unit.TestClientServerSynchronization Summary:
testLongProcess,   testLotsOfData
Methods from org.apache.cactus.ServletTestCase:
createProtocolHandler
Methods from org.apache.cactus.internal.AbstractCactusTestCase:
createProtocolHandler,   runBare,   runBareServer
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cactus.sample.servlet.unit.TestClientServerSynchronization Detail:
 public  void testLongProcess() throws Exception 
    Verify that the test result can be returned correctly even when the logic in the method to test takes a long time and thus it verifies that the test result is only returned after it has been written in the application scope on the server side.
 public  void testLotsOfData() throws Exception 
    Verify that when big amount of data is returned by the servlet output stream, it does not io-block.