fix: test utils events + workflow storage (#12834)

* feat(test-utils): Make event subscriber waiter robust and concurrent

* feat(test-utils): Make event subscriber waiter robust and concurrent

* fix workflows storage

* remove timeout

* Create gentle-teachers-doubt.md

* revert timestamp

* update changeset

* fix execution loop

* exit if no steps to await

* typo

* check next

* check next

* changeset

* skip when async steps

* wait workflow executions utils

* wait workflow executions utils

* wait workflow executions utils

* increase timeout

* break loop

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
Adrien de Peretti
2025-06-30 13:34:08 +02:00
committed by GitHub
parent 1e16fa6f57
commit 95d282e8ef
13 changed files with 441 additions and 190 deletions

View File

@@ -291,6 +291,15 @@ export class RedisDistributedTransactionStorage
.catch(() => undefined)
if (trx) {
const rawData = await this.redisClient.get(key)
let flow!: TransactionFlow, errors!: TransactionStepError[]
if (rawData) {
const data = JSON.parse(rawData)
flow = data.flow
errors = data.errors
}
const { idempotent } = options ?? {}
const execution = trx.execution as TransactionFlow
@@ -317,9 +326,9 @@ export class RedisDistributedTransactionStorage
}
return {
flow: trx.execution as TransactionFlow,
flow: flow ?? (trx.execution as TransactionFlow),
context: trx.context?.data as TransactionContext,
errors: trx.context?.errors as TransactionStepError[],
errors: errors ?? (trx.context?.errors as TransactionStepError[]),
}
}