typedb / typedb-driver

TypeDB Drivers for Rust, Python, Java, Node.js, C, C++, and C#.
https://typedb.com
Apache License 2.0
38 stars 32 forks source link

[Python Driver] client.close() doesn't appear to work #669

Closed TheDr1ver closed 4 months ago

TheDr1ver commented 4 months ago

https://github.com/vaticle/typedb-driver/blob/6cfb17d2561f5d6f17aeecf8d14592ef22874572/python/typedb/connection/driver.py#L96

shouldn't this line be if self.is_open() instead of if not self.is_open()?

Otherwise if you run client.close() followed by client.is_open() it still shows the client as being open... effectively client.close() isn't doing anything right now as far as I can tell.

farost commented 4 months ago

You're totally correct, it is a bug in our logic.

Moreover, it indicates a hole in our tests! I've created an issue for behaviour tests to prevent it from happening in the future, and I'll add an integration test for this driver with the fix.

farost commented 4 months ago

Thanks for noticing it! The fix for this issue will be a part of the next release (hopefully by the end of the next week).