Skip to content

Commit 1274d07

Browse files
committed
Upload dars in batches to avoid hitting gRPC limit
Signed-off-by: Divam <[email protected]>
1 parent ee324c2 commit 1274d07

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/BootstrapPackageConfigIntegrationTest.scala

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,18 @@ class BootstrapPackageConfigIntegrationTest
168168
// This simulates an app vetting newer versions of their own DARs depending on newer splice-amulet versions
169169
// before the SVs do so. Topology aware package selection will then force the old splice-amulet and old splitwell versions
170170
// for composed transactions. Note that for this to work splitwell contracts must be downgradeable.
171+
172+
// Split into batches to avoid gRPC message size limit (10 MB)
173+
val batchSize = 12
174+
val versionBatches =
175+
DarResources.splitwell.all.map(_.metadata.version).distinct.grouped(batchSize).toSeq
176+
171177
Seq(aliceValidatorBackend, bobValidatorBackend, splitwellValidatorBackend).foreach { p =>
172-
p.participantClient.dars.upload_many(
173-
DarResources.splitwell.all
174-
.map(_.metadata.version)
175-
.distinct
176-
.map((v: PackageVersion) => s"daml/dars/splitwell-$v.dar")
177-
)
178+
versionBatches.foreach { batch =>
179+
p.participantClient.dars.upload_many(
180+
batch.map((v: PackageVersion) => s"daml/dars/splitwell-$v.dar")
181+
)
182+
}
178183
}
179184
}
180185

0 commit comments

Comments
 (0)