fix(workflows-sdk):transaction id inheritence (#9507)
This commit is contained in:
@@ -269,9 +269,7 @@ describe("Workflow composer", () => {
|
||||
expect(result).toEqual({ result: "hi from outside" })
|
||||
|
||||
expect(parentContext.transactionId).toEqual(expect.any(String))
|
||||
expect(parentContext.transactionId).not.toEqual(
|
||||
childContext.transactionId
|
||||
)
|
||||
expect(parentContext.transactionId).toEqual(childContext.transactionId)
|
||||
|
||||
expect(parentContext.eventGroupId).toEqual("eventGroupId")
|
||||
expect(parentContext.eventGroupId).toEqual(childContext.eventGroupId)
|
||||
@@ -317,9 +315,7 @@ describe("Workflow composer", () => {
|
||||
expect(result).toEqual({ result: "hi from outside" })
|
||||
|
||||
expect(parentContext.transactionId).toBeTruthy()
|
||||
expect(parentContext.transactionId).not.toEqual(
|
||||
childContext.transactionId
|
||||
)
|
||||
expect(parentContext.transactionId).toEqual(childContext.transactionId)
|
||||
|
||||
expect(parentContext.eventGroupId).toBeTruthy()
|
||||
expect(parentContext.eventGroupId).toEqual(childContext.eventGroupId)
|
||||
|
||||
@@ -199,9 +199,9 @@ export function createWorkflow<TData, TResult, THooks extends any[]>(
|
||||
input: stepInput as any,
|
||||
container,
|
||||
context: {
|
||||
transactionId: ulid(),
|
||||
...sharedContext,
|
||||
parentStepIdempotencyKey: stepContext.idempotencyKey,
|
||||
transactionId: ulid(),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user