Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(langgraph): add tests to validate AbortSignal is passed into nodes #981

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

benjamincburns
Copy link
Collaborator

@benjamincburns benjamincburns commented Mar 11, 2025

Also validates that

  • The signal received by nodes
    • fires in the event of a timeout
    • fires in the event of an external trigger (user code calling abort on the associated AbortController)
    • propagates correctly from parent graphs into subgraphs
      • when subgraph is called from within a node w/o explicitly passing config
      • when subgraph is a node

@benjamincburns benjamincburns force-pushed the ben/abort-signal-testing branch from 24ccf8c to 4b1a9f3 Compare March 11, 2025 23:17
@@ -9708,47 +9708,6 @@ graph TD;
expect(thirdState.tasks).toHaveLength(0);
});

it("should cancel when signal is aborted", async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to new file because this one is massive and I'm actively splitting it up in another branch.

@benjamincburns benjamincburns merged commit 635d629 into main Mar 11, 2025
19 checks passed
@benjamincburns benjamincburns deleted the ben/abort-signal-testing branch March 11, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant