From 04486ce210aedca6f2a46cebded61919bc0bb92b Mon Sep 17 00:00:00 2001 From: Roland Bengtsson Date: Fri, 6 Dec 2024 22:57:53 +0200 Subject: [PATCH] Updated BoldTest cases due to Bold changes. #20 --- Source/BoldTestCases/Code/ObjectSpace/aniv_1.pas | 2 +- Source/BoldTestCases/Code/ObjectSpace/aniv_FLS.pas | 6 ------ Source/BoldTestCases/Code/Propagator/maanClientHandler.pas | 2 +- .../Code/Propagator/maanClientNotificationComps.pas | 2 +- .../Code/Propagator/maanClientNotifierHandler.pas | 4 ++-- .../BoldTestCases/Code/Propagator/maanPropagatorCleanUp.pas | 2 +- Source/BoldTestCases/Framework/UnitTest/BoldUnitTestReg.pas | 4 ---- 7 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Source/BoldTestCases/Code/ObjectSpace/aniv_1.pas b/Source/BoldTestCases/Code/ObjectSpace/aniv_1.pas index a39335e6..d0a5c019 100644 --- a/Source/BoldTestCases/Code/ObjectSpace/aniv_1.pas +++ b/Source/BoldTestCases/Code/ObjectSpace/aniv_1.pas @@ -23,7 +23,7 @@ interface BoldUMLModelLink, BoldUMLXMILink, DB, BoldAbstractDatabaseAdapter, BoldAbstractPersistenceHandleDB, BoldDatabaseAdapterUniDAC, DBAccess, Uni, PostgreSQLUniProvider, - InterBaseUniProvider, DAScript, UniScript, System.Actions; + DAScript, UniScript, System.Actions; type Tdm_aniv_test1 = class(TDataModule) diff --git a/Source/BoldTestCases/Code/ObjectSpace/aniv_FLS.pas b/Source/BoldTestCases/Code/ObjectSpace/aniv_FLS.pas index afb66d73..1f03e337 100644 --- a/Source/BoldTestCases/Code/ObjectSpace/aniv_FLS.pas +++ b/Source/BoldTestCases/Code/ObjectSpace/aniv_FLS.pas @@ -69,7 +69,6 @@ TAniv_Regions = class(TLocalTestCase) procedure ParentExpansion; end; - {$IFNDEF BOLD_NO_QUERIES} TDummyLockHolder = class; TAniv_LockHandler = class(TLocalTestCase) @@ -135,7 +134,6 @@ TDummyLockHolder = class(TBoldLockHolder) procedure GetPropagationEvents(EventList: TStringList); override; function EnsureLocks: Boolean; override; end; - {$ENDIF} var dmAnivFLS: TdmAnivFLS; @@ -707,7 +705,6 @@ class function TAniv_Regions.Suite: ITestSuite; SetCommentForTest(Result, 'ParentExpansion', ''); end; -{$IFNDEF BOLD_NO_QUERIES} { TAniv_LockHandler } procedure TAniv_LockHandler.DeletingObjects; @@ -1202,16 +1199,13 @@ procedure TAniv_FLS_Various.TearDown; FreeAndNil(LockHolder); FreeAndNil(dmAnivFLS); end; -{$ENDIF} initialization TestGlobal.RegisterTestCase(TAniv_RegionDefinitions); TestGlobal.RegisterTestCase(TAniv_Regions); - {$IFNDEF BOLD_NO_QUERIES} TestGlobal.RegisterTestCase(TAniv_FLS_Various); TestGlobal.RegisterTestCase(TAniv_LockHandler); TestGlobal.RegisterTestCase(TAniv_LockHolder); TestGlobal.RegisterTestCase(TAniv_LockingHandle); - {$ENDIF} end. diff --git a/Source/BoldTestCases/Code/Propagator/maanClientHandler.pas b/Source/BoldTestCases/Code/Propagator/maanClientHandler.pas index bb785dce..517d6f4a 100644 --- a/Source/BoldTestCases/Code/Propagator/maanClientHandler.pas +++ b/Source/BoldTestCases/Code/Propagator/maanClientHandler.pas @@ -122,7 +122,7 @@ procedure TMaan_TestCaseClientHandler.SetUp; for i:= 0 to NO_CLIENTS do begin if not Assigned(fClientHandler) then - fClientHandler := TTestableClientHandler.Create; + fClientHandler := TTestableClientHandler.Create(fClientHandler); if not Assigned(ListenerIntf) then ListenerIntf := TTestBoldListener.Create; fClientidentifierString := Format('TestClient%d', [i]); diff --git a/Source/BoldTestCases/Code/Propagator/maanClientNotificationComps.pas b/Source/BoldTestCases/Code/Propagator/maanClientNotificationComps.pas index 2b839170..829c8497 100644 --- a/Source/BoldTestCases/Code/Propagator/maanClientNotificationComps.pas +++ b/Source/BoldTestCases/Code/Propagator/maanClientNotificationComps.pas @@ -351,7 +351,7 @@ procedure TTestCase_PriorityListEnlister.SetUp; fOutputQueueHandler := TTestableOutputQueueHandler.Create; fPriorityListEnlister := TTestablePriorityListEnlister.Create; fNotificationList := TList.Create; - fClientHandler := TBoldClientHandler.Create; + fClientHandler := TBoldClientHandler.Create(fClientHandler); (fPriorityListEnlister as TTestablePriorityListEnlister).PriorityList.OnHeadChanged := OnPriorityChanged; // register clients 1 & 2 RegisterClients; diff --git a/Source/BoldTestCases/Code/Propagator/maanClientNotifierHandler.pas b/Source/BoldTestCases/Code/Propagator/maanClientNotifierHandler.pas index 73f837e6..7432d02c 100644 --- a/Source/BoldTestCases/Code/Propagator/maanClientNotifierHandler.pas +++ b/Source/BoldTestCases/Code/Propagator/maanClientNotifierHandler.pas @@ -87,7 +87,7 @@ procedure TTestCase_ClientNotifier.SetUp; fListenerThread.Resume; fListenerThread.WaitUntilReady(INFINITE); fPriorityListEnlister := TMyPriorityListEnlister.Create; - fClientHandler := TBoldClientHandler.Create; + fClientHandler := TBoldClientHandler.Create(fClientHandler); fClientNotifierHandler := TBoldClientNotifierHandler.Create(1, fClientHandler, fPriorityListEnlister.PriorityList, true); end; @@ -154,7 +154,7 @@ procedure TTestCase_ClientNotifierHandler.SetUp; fListenerThread := TTestListenerThread2.Create(true, 4); fListenerThread.Resume; fListenerThread.WaitUntilReady(INFINITE); - fClientHandler:= TBoldClientHandler.Create; + fClientHandler:= TBoldClientHandler.Create(fClientHandler); fPriorityListEnlister:= TMyPriorityListEnlister.Create; fOutputQueueHandler:= TMyOutputQueueHandler.Create; fClientNotifierHandler:= TBoldClientNotifierHandler.Create(15, fClientHandler, fPriorityListEnlister.Prioritylist, true); diff --git a/Source/BoldTestCases/Code/Propagator/maanPropagatorCleanUp.pas b/Source/BoldTestCases/Code/Propagator/maanPropagatorCleanUp.pas index 07255f59..b7b57623 100644 --- a/Source/BoldTestCases/Code/Propagator/maanPropagatorCleanUp.pas +++ b/Source/BoldTestCases/Code/Propagator/maanPropagatorCleanUp.pas @@ -67,7 +67,7 @@ procedure TTestCase_PropagatorCleanUp.SetUp; fPropagator := TDummyAdvancedPropagator.Create; fPropagator.Initialize; (TPropagatorServerTest.Instance as TPropagatorServerTest).fAdvancedPropagator := fPropagator; - fClientHandler := TTestableClientHandler.Create; + fClientHandler := TTestableClientHandler.Create(fClientHandler); fEventQueue := TBoldThreadSafeObjectQueue.Create('TSQ-Testcase/Cleanup'); fPropagator.fClientHandlerTest := fClienthandler; fCleanUpSubscriber := TBoldCleanUpSubscriber.Create(fClientHandler); diff --git a/Source/BoldTestCases/Framework/UnitTest/BoldUnitTestReg.pas b/Source/BoldTestCases/Framework/UnitTest/BoldUnitTestReg.pas index f4d95687..a7ca68b8 100644 --- a/Source/BoldTestCases/Framework/UnitTest/BoldUnitTestReg.pas +++ b/Source/BoldTestCases/Framework/UnitTest/BoldUnitTestReg.pas @@ -46,11 +46,9 @@ implementation maan_PropagatorLockingSupport, maanBoldSnooperHandle, aniv_1, - {$IFNDEF BOLD_NO_QUERIES} aniv_FLS, {$IFNDEF OXML} aniv_xml, - {$ENDIF} {$ENDIF} aniv_temporal, dmjehoBoldTest, @@ -136,7 +134,6 @@ procedure RegisterObjectSpaceTestCases; TAniv_PrioQueue.Suite, TAniv_Various.Suite, TAniv_fmDistributable.Suite]), - {$IFNDEF BOLD_NO_QUERIES} TTestSuite.Create('FullLockingSupport testcases', [TAniv_RegionDefinitions.Suite, TAniv_Regions.Suite, @@ -144,7 +141,6 @@ procedure RegisterObjectSpaceTestCases; TAniv_FLS_Various.Suite, TAniv_LockHolder.Suite, TAniv_LockingHandle.Suite]), - {$ENDIF} TAniv_temporal1.Suite, {$IFNDEF OXML} // TODO update TAniv_XMLStreaming to work with OXML TAniv_XMLStreaming.Suite,