Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-06

fcl-db test suite

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

LacaK

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.

Reply by email