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

Tests and steps to check if connection is open or closed #289

Open
farost opened this issue Jul 5, 2024 · 1 comment
Open

Tests and steps to check if connection is open or closed #289

farost opened this issue Jul 5, 2024 · 1 comment
Assignees

Comments

@farost
Copy link
Member

farost commented Jul 5, 2024

Problem to Solve

It looks like we don't have behavior steps that check if the connection is closed after we send the close command, for example, after connection closes from user.feature. We only have a positive step connection has been opened, which is more of a reactive check after we just open the connection.

Even if it's limited for TypeDB itself (I assume that it is not implemented for a reason), it's a crucial logic for TypeDB Drivers. The absence of these tests already resulted in a bug in the Python Driver.

Proposed Solution

Add a test like:

When connection opens with default authentication
Then connection is open
When connection closes
Then connection is closed / is not open

We might also deprecate connection has been opened

farost added a commit to typedb/typedb-driver that referenced this issue Jul 5, 2024
…ing for both core and cloud (#670)

## Usage and product changes
We fix the issue #669,
where the Python Driver didn't close the connection when calling
`TypeDBDriver.close()`.

## Implementation
We needed to reverse the condition of `is_open()`.

The main issue is the absence of tests for our drivers' connections, so
we:
* add new integration tests for both core and cloud;
* create an issue for behaviour tests to cover this hole for a brighter
future: typedb/typedb-behaviour#289.
@farost farost self-assigned this Oct 3, 2024
@farost
Copy link
Member Author

farost commented Oct 3, 2024

Working on it as a part of the 3.0 tests rewrite

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

1 participant