Skip to content

Timeout for DB for tests #157

@kinglite

Description

@kinglite

Hey,

in a closed issue a problem with possible zombie threads was mentioned, but no real solution by this package was provided.

I also had this kind of problem and of course you can work around this issue if you have access to the infrastructure it is running on. But it would be nice if that would not be necessary.

TL;DR:
I think the main use of this package is while testing. So here my idea with that in mind:
How about a parameter that can be set on DB creation providing a timeout (maybe context with timeout), that would simply internally kill/stop the DB when time is reached?

Usually a test is running not that long and at some point the DB can be killed/stopped.

(Maybe this can be extended in a general, outside of tests, use case with a timeout targeted on missing connections to that DB.
If the DB is running for a time X without a connection present, it could also be killed/stopped.
But I think the first suggestion for test purpose is more relevant.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions