Skip to content

Commit bf4e5b7

Browse files
authored
Increase Canton startup timeouts (#2361)
* Remove Canton Splice timeout * Increase timeout * Remove startup timeouts * Add changeset * Increase timeouts * Add note to newCanton
1 parent df3b2a9 commit bf4e5b7

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

framework/.changeset/v0.13.9.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Increase Canton startup timeouts to one hour

framework/components/blockchain/canton.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ type CantonParticipantEndpoints struct {
4141
// newCanton sets up a Canton blockchain network with the specified number of validators.
4242
// It creates a Docker network and starts the necessary containers for Postgres, Canton, Splice, and an Nginx reverse proxy.
4343
//
44+
// Startup timeout: note spinning up a Canton network can take several minutes due to the initialization of the Splice service.
45+
// tests utilizing this function should set an appropriate timeout to accommodate for this. CTF will time out after 1 hour by default.
46+
//
4447
// The reverse proxy is used to allow access to all validator participants through a single HTTP endpoint.
4548
// The following routes are configured for each participant and the Super Validator (SV):
4649
// - http://[PARTICIPANT].json-ledger-api.localhost:[PORT] -> JSON Ledger API => https://docs.digitalasset.com/build/3.3/reference/json-api/json-api.html

framework/components/blockchain/canton/canton.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package canton
33
import (
44
"fmt"
55
"strings"
6+
"time"
67

78
"github.com/testcontainers/testcontainers-go"
89
"github.com/testcontainers/testcontainers-go/wait"
@@ -328,7 +329,7 @@ func ContainerRequest(
328329
WaitingFor: wait.ForExec([]string{
329330
"/bin/bash",
330331
"/app/health-check.sh",
331-
}),
332+
}).WithStartupTimeout(time.Hour),
332333
Env: map[string]string{
333334
"DB_SERVER": postgresContainerName,
334335
"DB_USER": DefaultPostgresUser,

framework/components/blockchain/canton/splice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func SpliceContainerRequest(
337337
WaitingFor: wait.ForExec([]string{
338338
"/bin/bash",
339339
"/app/health-check.sh",
340-
}).WithStartupTimeout(time.Minute * 5),
340+
}).WithStartupTimeout(time.Hour),
341341
Env: map[string]string{
342342
"DB_SERVER": postgresContainerName,
343343
"DB_USER": DefaultPostgresUser,

0 commit comments

Comments
 (0)