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

Db module has an open connection prior to the first test when reconnect is used #3903

Closed
insightfuls opened this Issue Jan 10, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@insightfuls
Contributor

insightfuls commented Jan 10, 2017

I experienced this issue with SQLite on Windows. The application I am testing contains code that I run in the setup phase (_before) that initialises the database and clears temporary directories. It deletes any existing database file as part of this process. It runs fine on Mac OS X where the SQLite database file can be deleted despite still being connected. However, on Windows, it fails for the first test only. This is because, despite reconnect being used, _initialize leaves the database connected. Every other test after the first succeeds, because _after disconnects the database.

I have prepared a pull request which addresses this. I hope it will be considered satisfactory for inclusion.

@insightfuls

This comment has been minimized.

Show comment
Hide comment
@insightfuls

insightfuls Jan 10, 2017

Contributor

The pull request is #3904.

Contributor

insightfuls commented Jan 10, 2017

The pull request is #3904.

Naktibalda added a commit that referenced this issue Jan 14, 2017

Merge pull request #3904 from insightfuls/disconnect_after_initialize
[Db] Disconnect after initializing when using reconnect, fixes #3903

chris1312 added a commit to chris1312/Codeception that referenced this issue Jun 16, 2017

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