Skip to content

Conversation

@pieh
Copy link
Contributor

@pieh pieh commented Aug 9, 2022

Description

First problem - our test suites are not really isolated when it comes to lmdb - once lmdb is opened in a process it will remain opened until closed.

Second problem - global is resetted between test suites/files - that means neither we or lmdb internally can use anything "global" like to prevent opening new dbs in new test suites tespite those dbs being in fact already openend.

This PR does few things:

  • make use of custom environment to just close all lmdb instances after test suite is done to prevent dangling open handles (it can read global object for the test suite that might have been mutated - in our case references to open lmdb dbs)
  • add global tracking for cache-lmdb (we already use it for datastore)

Related Issues

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 9, 2022
@pieh pieh removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 10, 2022
@pieh pieh changed the title just checking flaky windows tests fix(test): clear and close lmdb after each test suite Aug 10, 2022
@pieh pieh marked this pull request as ready for review August 10, 2022 12:14
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

Successfully merging this pull request may close these issues.

3 participants