Update of /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool
In directory sc8-pr-cvs1:/tmp/cvs-serv18806
Modified Files:
ConfigurationListenerTest.java
Log Message:
enhanced to trap bug where config change event gets fired
all the time
Index: ConfigurationListenerTest.java
===================================================================
RCS file: /cvsroot/proxool/proxool/src/java-test/org/logicalcobwebs/proxool/ConfigurationListenerTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ConfigurationListenerTest.java 4 Mar 2003 10:24:40 -0000 1.9
--- ConfigurationListenerTest.java 10 Apr 2003 21:48:58 -0000 1.10
***************
*** 10,13 ****
--- 10,14 ----
import java.util.Properties;
+ import java.sql.DriverManager;
/**
***************
*** 87,90 ****
--- 88,107 ----
mcl2.reset();
+ // Check that just asking for another Connection (without config
+ // change) doesn't trigger another event
+ DriverManager.getConnection(url).close();
+ assertEquals("definitionReceived", false, mcl2.isUpdateReceived());
+ mcl2.reset();
+
+ // Now try again, but this time pass in the properties (without
+ // change)
+ LOG.debug("Getting another connection to trigger any pending config changes");
+ DriverManager.getConnection(url, info).close();
+ mcl2.reset();
+ LOG.debug("Getting another connection which shouldn't cause another config change");
+ DriverManager.getConnection(url, info).close();
+ assertEquals("definitionReceived", false, mcl2.isUpdateReceived());
+ mcl2.reset();
+
// Remove the second listener
ProxoolFacade.removeConfigurationListener(alias, mcl2);
***************
*** 212,215 ****
--- 229,236 ----
Revision history:
$Log$
+ Revision 1.10 2003/04/10 21:48:58 billhorsman
+ enhanced to trap bug where config change event gets fired
+ all the time
+
Revision 1.9 2003/03/04 10:24:40 billhorsman
removed try blocks around each test
|