Skip to content

Commit ae16fbd

Browse files
committed
feat: modified tempo wait message
1 parent e42ff6d commit ae16fbd

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.changeset/rare-doors-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"prool": patch
3+
---
4+
5+
Modified wait message for `Instance.tempo`.

src/instances/tempo.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ export const tempo = Instance.define((parameters?: tempo.Parameters) => {
104104
})`${[binary, ...command({ ...args, port })]}`,
105105
{
106106
...options,
107-
// Resolve when the process is listening via "RPC HTTP server started" message.
107+
// Resolve when the process is listening via "Received block from consensus engine" message.
108108
resolver({ process, reject, resolve }) {
109109
process.stdout.on('data', (data) => {
110110
const message = data.toString()
111111
if (log) console.log(message)
112-
if (message.includes('RPC HTTP server started')) resolve()
112+
if (message.includes('Received block from consensus engine'))
113+
resolve()
113114
if (message.includes('shutting down')) reject('shutting down')
114115
})
115116
process.stderr.on('data', (data) => {

src/testcontainers/Instance.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export const tempo = Instance.define((parameters?: tempo.Parameters) => {
5959
.withName(containerName)
6060
.withEnvironment({ RUST_LOG })
6161
.withCommand(command({ ...args, port }))
62-
.withWaitStrategy(Wait.forLogMessage(/RPC HTTP server started/))
62+
.withWaitStrategy(
63+
Wait.forLogMessage(/Received block from consensus engine/),
64+
)
6365
.withLogConsumer((stream) => {
6466
stream.on('data', (data) => {
6567
const message = data.toString()

0 commit comments

Comments
 (0)