Transaction Timeout

Version History:

Version#DateModified ByDescription of Modification
1.06/1/2015Sailaja AdusumilliInitial Version


Overview:

TransactionTimeout project is used to test timeout for each transaction. It is accomplished by mocking responding gateway adapter and adding an on request script that sleeps for a configurable amount of time. Testing should be done in pass through mode or with auditing/policy engine disabled to remove any added processing time in the server.  There is a custom property "TransactionTimeoutValue" added to the project which will have a value in milliseconds and it is used to populate <urn1:transactionTimeout> request element. The custom property value is optional, if it is not included will default to gateway.propery  "webserviceproxy.timeout" setting. This project have three test suites and each test suite consists of AD, PD, DQ, DR, DS, X12 services. Test suite description and what it does are described below:

TestSuite Details:

LargeTransactionTimeout: This suite is used to test large timeouts.  LargeTimeout value used in this suite is 15000 millisec and mock adapter freeze time is 20000 millisec. This means, while running this suite, each test case causes a configurable freeze on the responding gateway for 20000 millisec, and fault error will be returned at given timeout value (i.e. 15000 millisec.).  For each service request start time, end time and transaction timed out duration details are logged in Soap-UI script log. However, a detailed fault error message can be found in server.log which starts with ""org.apache.cxf.interceptor.Fault: Could not send Message. Caused by: java.net.SocketTimeoutException: SocketTimeoutException"".

EmptyTransactionTimeout: This suite is used to test empty timeouts.  When an empty timeout element value is passed, testsuite uses the default timeout value from gateway.property "webserviceproxy.timeout" setting. Freeze time on mock adapter is 20000 millisec. This means, while running this suite, each test case causes a configurable freeze on the responding gateway for 20000 millisec, and fault error will be returned at given timeout value (i.e. as per default setting value from gateway.property).  In order to speedup test suite execution time, there is a script which will lower down gateway.property "webserviceproxy.timeout" setting value.  For each service request start time, end time and transaction timed out duration details are logged in Soap-UI script log. However, a detailed fault error message can be found in server.log which starts with ""org.apache.cxf.interceptor.Fault: Could not send Message. Caused by: java.net.SocketTimeoutException: SocketTimeoutException"".


NegativeTransactionTimeout: This suite is used to test negative timeouts.  When a negative timeout element value is passed (i.e. <=0), test suite uses the default timeout value from gateway.property "webserviceproxy.timeout" setting. Freeze time on mock adapter is 20000 millisec. This means, while running this suite, each test case causes a configurable freeze on the responding gateway for 20000 millisec, and fault error will be returned at given timeout value (i.e. as per default setting value from gateway.property). In order to speedup test suite execution time, there is a script which will lower down gateway.property "webserviceproxy.timeout" setting value.  For each service request start time, end time and transaction timed out duration details are logged in Soap-UI script log. However, a detailed fault error message can be found in server.log which starts with ""org.apache.cxf.interceptor.Fault: Could not send Message. Caused by: java.net.SocketTimeoutException: SocketTimeoutException"".

Preparation & Execution:

  1. Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS,X12) 
  2. Enable Passthrough mode.
  3. In SoapUI, load TransactionTimeoutTest project and execute.
  4. Monitor SoapUI Script log to check actual service start time, service end time and timed out duration.
  5. To trace accurate time, monitor server.log and check for service start time and fault timeout time. Timeout should happen approximately at given service timeout value. 
  6. Make sure all three suites are passed.Â