[fpc-devel] fcl-db test suite

LacaK lacak at zoznam.sk
Thu Jun 16 15:07:20 CEST 2011


Hi *,
I am now playing with test suite for fcl-db.
I encounter, that for every test in testfieldtypes.pas is repeatedly 
called InitialiseDBConnector in toolsunit.pas (because of  procedure 
TTestFieldTypes.SetUp), which set-ups testValues and create instance of 
TSQLDBConnector (which creates instance of TSQLConnection and 
TSQLTransaction etc.)

I guess, that to avoid it, there was introduced ref-counting mechanism in:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-db/tests/toolsunit.pas?r1=15388&r2=15387&pathrev=15388

But it does not work, because global variable DBConnectorRefCount is 
incremented in procedure InitialiseDBConnector after test:
if DBConnectorRefCount>0 then exit;

So variable DBConnectorRefCount will never be > 1

Joost, Michael what do you think about it ?

TIA
-Laco.



More information about the fpc-devel mailing list