Skip to content

Commit ac610a8

Browse files
Revert "Add integration test for participant pruning (#3089)" (#3125)
Signed-off-by: Julien Tinguely <[email protected]>
1 parent c30f86b commit ac610a8

File tree

2 files changed

+30
-78
lines changed

2 files changed

+30
-78
lines changed
Lines changed: 29 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
11
package org.lfdecentralizedtrust.splice.integration.tests
22

3-
import com.digitalasset.canton.admin.api.client.data.PruningSchedule
4-
import com.digitalasset.canton.config.CantonRequireTypes.InstanceName
5-
import com.digitalasset.canton.config.RequireTypes.Port
6-
import com.digitalasset.canton.config.{
7-
FullClientConfig,
8-
NonNegativeFiniteDuration,
9-
PositiveDurationSeconds,
10-
}
11-
import com.digitalasset.canton.logging.SuppressionRule
12-
import com.digitalasset.canton.util.ShowUtil.*
13-
import org.lfdecentralizedtrust.splice.config.{
14-
ConfigTransforms,
15-
ParticipantClientConfig,
16-
PruningConfig,
17-
}
3+
import org.lfdecentralizedtrust.splice.config.{ConfigTransforms, ParticipantClientConfig}
184
import org.lfdecentralizedtrust.splice.console.ValidatorAppBackendReference
19-
import org.lfdecentralizedtrust.splice.store.AppStoreWithIngestion.SpliceLedgerConnectionPriority.Low
205
import org.lfdecentralizedtrust.splice.sv.automation.singlesv.SequencerPruningTrigger
216
import org.lfdecentralizedtrust.splice.sv.config.SequencerPruningConfig
227
import org.lfdecentralizedtrust.splice.util.{ProcessTestUtil, WalletTestUtil}
238
import org.lfdecentralizedtrust.splice.validator.automation.ReconcileSequencerConnectionsTrigger
9+
import com.digitalasset.canton.config.CantonRequireTypes.InstanceName
10+
import com.digitalasset.canton.config.{FullClientConfig, NonNegativeFiniteDuration}
11+
import com.digitalasset.canton.config.RequireTypes.Port
12+
import com.digitalasset.canton.logging.SuppressionRule
13+
import com.digitalasset.canton.util.ShowUtil.*
2414
import org.slf4j.event.Level
2515

2616
import scala.concurrent.duration.*
2717

28-
class PruningIntegrationTest
18+
class SequencerPruningIntegrationTest
2919
extends SvIntegrationTestBase
3020
with WalletTestUtil
3121
with ProcessTestUtil {
@@ -62,70 +52,31 @@ class PruningIntegrationTest
6252
)(config),
6353
(_, config) =>
6454
config.copy(
65-
validatorApps =
66-
config.validatorApps.updatedWith(InstanceName.tryCreate("sv1Validator")) {
67-
_.map { config =>
68-
config.copy(
69-
// schedule needs to be defined to activate participant pruning
70-
participantPruningSchedule = Some(
71-
PruningConfig(
72-
"0 /1 * * * ?",
73-
PositiveDurationSeconds.tryFromDuration(1.seconds),
74-
PositiveDurationSeconds.tryFromDuration(1.seconds),
75-
)
76-
)
77-
)
78-
}
79-
} + (
80-
InstanceName.tryCreate("bobValidatorLocal") -> {
81-
val bobValidatorConfig = config
82-
.validatorApps(InstanceName.tryCreate("bobValidator"))
83-
bobValidatorConfig
84-
.copy(
85-
participantClient = ParticipantClientConfig(
86-
FullClientConfig(port = Port.tryCreate(5902)),
87-
bobValidatorConfig.participantClient.ledgerApi.copy(
88-
clientConfig =
89-
bobValidatorConfig.participantClient.ledgerApi.clientConfig.copy(
90-
port = Port.tryCreate(5901)
91-
)
92-
),
55+
validatorApps = config.validatorApps + (
56+
InstanceName.tryCreate("bobValidatorLocal") -> {
57+
val bobValidatorConfig = config
58+
.validatorApps(InstanceName.tryCreate("bobValidator"))
59+
bobValidatorConfig
60+
.copy(
61+
participantClient = ParticipantClientConfig(
62+
FullClientConfig(port = Port.tryCreate(5902)),
63+
bobValidatorConfig.participantClient.ledgerApi.copy(
64+
clientConfig =
65+
bobValidatorConfig.participantClient.ledgerApi.clientConfig.copy(
66+
port = Port.tryCreate(5901)
67+
)
9368
),
94-
// We disable the ReconcileSequencerConnectionsTrigger to prevent domain disconnections
95-
// from interfering with traffic top-ups (see #14474)
96-
automation = bobValidatorConfig.automation
97-
.withPausedTrigger[ReconcileSequencerConnectionsTrigger],
98-
)
99-
}
100-
)
69+
),
70+
// We disable the ReconcileSequencerConnectionsTrigger to prevent domain disconnections
71+
// from interfering with traffic top-ups (see #14474)
72+
automation = bobValidatorConfig.automation
73+
.withPausedTrigger[ReconcileSequencerConnectionsTrigger],
74+
)
75+
}
76+
)
10177
),
10278
)
10379

104-
"participant can be pruned" should {
105-
106-
"when configured, sv1 participant prunes every minute" in { implicit env =>
107-
initDsoWithSv1Only()
108-
109-
clue("Check sv1 participant has the expected smallest pruning schedule") {
110-
sv1ValidatorBackend.participantClient.pruning.get_schedule() shouldBe Some(
111-
PruningSchedule(
112-
"0 /1 * * * ?",
113-
PositiveDurationSeconds.tryFromDuration(1.seconds),
114-
PositiveDurationSeconds.tryFromDuration(1.seconds),
115-
)
116-
)
117-
}
118-
119-
eventually(timeUntilSuccess = 70.seconds) {
120-
sv1Backend.svAutomation
121-
.connection(Low)
122-
// returns 0 when participant pruning is disabled
123-
.latestPrunedOffset()
124-
.futureValue should be > 0L
125-
}
126-
}
127-
}
128-
12980
"sequencer can be pruned even if a participant is down" in { implicit env =>
13081
clue("Initialize DSO with 2 SVs") {
13182
startAllSync(
@@ -188,4 +139,5 @@ class PruningIntegrationTest
188139
timeUntilSuccess = 3.minutes,
189140
)
190141
}
142+
191143
}

test-full-class-names.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ org.lfdecentralizedtrust.splice.integration.tests.FeaturedAppActivityMarkerInteg
1717
org.lfdecentralizedtrust.splice.integration.tests.GcpBucketPeriodicBackupIntegrationTest
1818
org.lfdecentralizedtrust.splice.integration.tests.MemberTrafficIntegrationTest
1919
org.lfdecentralizedtrust.splice.integration.tests.ParticipantPlaintextIdentitiesIntegrationTest
20-
org.lfdecentralizedtrust.splice.integration.tests.PruningIntegrationTest
2120
org.lfdecentralizedtrust.splice.integration.tests.RecoverExternalPartyIntegrationTest
2221
org.lfdecentralizedtrust.splice.integration.tests.RewardExpiryIntegrationTest
2322
org.lfdecentralizedtrust.splice.integration.tests.ScanConnectionIntegrationTest
2423
org.lfdecentralizedtrust.splice.integration.tests.ScanEventHistoryIntegrationTest
2524
org.lfdecentralizedtrust.splice.integration.tests.ScanHistoryBackfillingIntegrationTest
2625
org.lfdecentralizedtrust.splice.integration.tests.ScanIntegrationTest
2726
org.lfdecentralizedtrust.splice.integration.tests.ScanTxLogOwnerExpireLockIntegrationTest
27+
org.lfdecentralizedtrust.splice.integration.tests.SequencerPruningIntegrationTest
2828
org.lfdecentralizedtrust.splice.integration.tests.SplitwellIntegrationTest
2929
org.lfdecentralizedtrust.splice.integration.tests.SplitwellUpgradeIntegrationTest
3030
org.lfdecentralizedtrust.splice.integration.tests.SvDevNetReonboardingIntegrationTest

0 commit comments

Comments
 (0)