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

fix: unhandled error on testkit shutdown #267

Merged

Conversation

jroper
Copy link
Member

@jroper jroper commented Mar 24, 2022

Fixes #265.

I'm hoping this will fix an unhandled error on testkit shutdown. I believe there is a race condition, the proxy container gets shutdown, and then immediately after the SDK will be shutdown. This will cause the connections between the two to close, but the proxy container might attempt to reconnect. This I think triggers TestContainers to throw an uncaught exception, which mocha fails on.

So, we have to wait for the proxy container to shutdown before shutting down the SDK, to ensure it won't attempt to reconnect.

@github-actions github-actions bot added kalix-runtime Runtime and SDKs sub-team typescript-sdk labels Mar 24, 2022
I'm hoping this will fix an unhandled error on testkit shutdown. I
believe there is a race condition, the proxy container gets shutdown,
and then immediately after the SDK will be shutdown. This will cause
the connections between the two to close, but the proxy container might
attempt to reconnect. This I think triggers TestContainers to throw an
uncaught exception, which mocha fails on.

So, we have to wait for the proxy container to shutdown before shutting
down the SDK, to ensure it won't attempt to reconnect.
@jroper jroper force-pushed the fix-unhandled-error-on-testkit-shutdown branch from c97c725 to a31015d Compare March 24, 2022 02:46
@jroper
Copy link
Member Author

jroper commented Mar 24, 2022

Integration tests passed three times in CI, good sign.

@jroper jroper requested a review from pvlugter March 24, 2022 02:58
@jroper jroper merged commit 5421ffa into lightbend:main Mar 24, 2022
@jroper jroper deleted the fix-unhandled-error-on-testkit-shutdown branch March 24, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kalix-runtime Runtime and SDKs sub-team typescript-sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests are flaky on CI
2 participants