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

Killing a running process(role) in integration tests #1320

Open
jbesraa opened this issue Dec 23, 2024 · 2 comments
Open

Killing a running process(role) in integration tests #1320

jbesraa opened this issue Dec 23, 2024 · 2 comments

Comments

@jbesraa
Copy link
Contributor

jbesraa commented Dec 23, 2024

Sometimes we need the ability to stop a role in order to perform testing on the behaviour of other roles. For example if jd-client connects to jd-server and then jd-client goes offline, we want to test how jd-server behaves, is it still able to accept connections from new jd-client(s). the problem is that we don't have access to the async communication channels started within the roles to send a shutdown signal. I wonder if someone can think of a neat way to achieve this without doing a hell of refactor in the code..

@Shourya742
Copy link
Contributor

@jbesraa, this can be implemented if we add shutdown signaling to the configuration. I worked on something similar for the translator (keeping this use case in mind to allow shutdown signaling from external services). I’ll be mirroring the approach used in the jd-client. For reference, you can check out this PR for translator: #1319.

@Shourya742
Copy link
Contributor

This PR #1321 introduces a shutdown method that is accessible through the JobDeclaratorClient instance.

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

No branches or pull requests

2 participants