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

Tank wrapping Waterfall does not close #112

Open
snorberhuis opened this issue Sep 28, 2018 · 2 comments
Open

Tank wrapping Waterfall does not close #112

snorberhuis opened this issue Sep 28, 2018 · 2 comments

Comments

@snorberhuis
Copy link

In my integration tests I am using a tank something like this:

tank : Tank
constructor(url){
this.tank = new Tank(new Waterfall(url));
}

If I call this.tank.close() my tests do not stop. Switching to only a Waterfall immediatly fixes this issue:

tank : Waterfall
constructor(url){
this.tank = new Waterfall(url);
}

Something seems to stop the tank from closing correctly. Any ideas on how I can provide more details?
@dcharbonnier
Copy link
Owner

You should always keep a reference to your "root" connection to close it, I tank could be connected to a more complicated pipeline and closing a "branch" does not means you want to close everything.
In your case closing the Waterfall is enough but you may even need to close both in some cases.
For now the tank is not able to change the underlying connection that could be a good enhancement and in this case closing the tank should not close the underlying connection, so the current API is the most flexible IMO.

@snorberhuis
Copy link
Author

snorberhuis commented Nov 5, 2018

Thanks for the clarification. You could add this to the documentation. The documentation on the Shell.close method does not document the fail conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants