@@ -43,6 +43,13 @@ class ManualStartIntegrationTest
4343
4444 override lazy val dbsSuffix = " manual_start_2_" + UUID .randomUUID.toString.substring(0 , 4 )
4545
46+ val sv1PruningScheduleOverride = PruningConfig (
47+ // run every 10s, for quick feedback
48+ " /10 * * * * ?" ,
49+ PositiveDurationSeconds .tryFromDuration(10 .seconds),
50+ PositiveDurationSeconds .tryFromDuration(20 .seconds),
51+ )
52+
4653 override def environmentDefinition : SpliceEnvironmentDefinition = {
4754 EnvironmentDefinition
4855 // Do not use `simpleTopology4Svs`, because that one waits for shared canton nodes to be initialized
@@ -67,20 +74,6 @@ class ManualStartIntegrationTest
6774 }
6875 },
6976 validatorApps = conf.validatorApps
70- .updatedWith(InstanceName .tryCreate(" sv1Validator" )) {
71- _.map { config =>
72- config.copy(
73- // schedule needs to be defined to activate participant pruning
74- participantPruningSchedule = Some (
75- PruningConfig (
76- " 0 /1 * * * ?" ,
77- PositiveDurationSeconds .tryFromDuration(10 .seconds),
78- PositiveDurationSeconds .tryFromDuration(20 .seconds),
79- )
80- )
81- )
82- }
83- }
8477 .updatedWith(InstanceName .tryCreate(" aliceValidator" )) {
8578 _.map { aliceValidatorConfig =>
8679 val withoutExtraDomains = aliceValidatorConfig.domains.copy(extra = Seq .empty)
@@ -95,7 +88,13 @@ class ManualStartIntegrationTest
9588 ),
9689 )
9790 }
98- },
91+ }
92+ + (InstanceName .tryCreate(" sv1ValidatorWithPruning" ) ->
93+ conf
94+ .validatorApps(InstanceName .tryCreate(" sv1Validator" ))
95+ .copy(
96+ participantPruningSchedule = Some (sv1PruningScheduleOverride)
97+ )),
9998 )
10099 )
101100 // Add a suffix to the canton identifiers to avoid metric conflicts with the shared canton nodes
@@ -138,15 +137,16 @@ class ManualStartIntegrationTest
138137 " EXTRA_PARTICIPANT_DB" -> (" participant_extra_" + dbsSuffix),
139138 ),
140139 )() {
141- val allCnApps = Seq [AppBackendReference ](
140+ val allCnAppsBase = Seq [AppBackendReference ](
142141 sv1Backend,
143142 sv1ScanBackend,
144- sv1ValidatorBackend,
145143 sv2Backend,
146144 sv2ScanBackend,
147145 sv2ValidatorBackend,
148146 aliceValidatorBackend,
149147 )
148+ val allCnAppsAtStart = allCnAppsBase ++ Seq (sv1ValidatorBackend)
149+ val allCnApps = allCnAppsBase ++ Seq (sv1ValidatorWithPruningBackend)
150150
151151 val allTopologyConnections
152152 : Seq [(TopologyAdminConnection , UniqueIdentifier => Member & NodeIdentity )] = Seq (
@@ -174,21 +174,23 @@ class ManualStartIntegrationTest
174174 }
175175
176176 clue(" Starting all Splice apps" ) {
177- startAllSync(allCnApps* )
177+ startAllSync(allCnAppsAtStart* )
178+ }
179+
180+ // We want to set pruning a bit later so it doesn't break init
181+ clue(" Restart sv1 validator with pruning enabled" ) {
182+ sv1ValidatorBackend.stop()
183+ sv1ValidatorWithPruningBackend.startSync()
178184 }
179185
180- clue(" Check sv1 participant has the expected smallest pruning schedule" ) {
186+ clue(" Check sv1 participant has the expected pruning schedule" ) {
181187 sv1ValidatorBackend.participantClient.pruning.get_schedule() shouldBe Some (
182- PruningSchedule (
183- " 0 /1 * * * ?" ,
184- PositiveDurationSeconds .tryFromDuration(10 .seconds),
185- PositiveDurationSeconds .tryFromDuration(20 .seconds),
186- )
188+ sv1PruningScheduleOverride.toSchedule
187189 )
188190 }
189191
190192 clue(" Check sv1 participant is actively pruning" ) {
191- eventually(2 .minutes ) {
193+ eventually() {
192194 sv1Backend.svAutomation
193195 .connection(Low )
194196 // returns 0 when participant pruning is disabled
0 commit comments