[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ConnectionResetter.java,1.14,1.15
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2005-10-07 08:22:00
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15414/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionResetter.java Log Message: New hook to allow unit tests to trigger a deliberate exception during reset Index: ConnectionResetter.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionResetter.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ConnectionResetter.java 10 Mar 2003 23:43:10 -0000 1.14 --- ConnectionResetter.java 7 Oct 2005 08:21:53 -0000 1.15 *************** *** 57,60 **** --- 57,65 ---- /** + * @see #isTriggerResetException() + */ + protected static boolean triggerResetException; + + /** * Pass in the log to use * @param log debug information sent here *************** *** 288,291 **** --- 293,301 ---- } + if (isTriggerResetException()) { + log.warn("Triggering pretend exception during reset"); + errorsEncountered = true; + } + if (errorsEncountered) { *************** *** 301,304 **** --- 311,326 ---- } + private static boolean isTriggerResetException() { + return triggerResetException; + } + + /** + * Called by a unit test. + * @param triggerResetException true it we should trigger a pretend exception. + * @see #isTriggerResetException() + */ + protected static void setTriggerResetException(boolean triggerResetException) { + ConnectionResetter.triggerResetException = triggerResetException; + } } *************** *** 306,309 **** --- 328,334 ---- Revision history: $Log$ + Revision 1.15 2005/10/07 08:21:53 billhorsman + New hook to allow unit tests to trigger a deliberate exception during reset + Revision 1.14 2003/03/10 23:43:10 billhorsman reapplied checkstyle that i'd inadvertently let |