-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow to open database in memory for faster test #3921
Merged
FirelightFlagboy
merged 30 commits into
2898-oxidation-storage-module
from
feat/local-db-in-memory-tests
Feb 1, 2023
Merged
Allow to open database in memory for faster test #3921
FirelightFlagboy
merged 30 commits into
2898-oxidation-storage-module
from
feat/local-db-in-memory-tests
Feb 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1307ae1
to
43da6bd
Compare
Base automatically changed from
3836-async-local-database
to
2898-oxidation-storage-module
January 18, 2023 12:30
58d80d4
to
044b7b3
Compare
2916a1a
to
bc80816
Compare
044b7b3
to
ab119e8
Compare
bc80816
to
3ee04a7
Compare
ab119e8
to
b463b47
Compare
b463b47
to
3cc54cb
Compare
TimeEngineer
approved these changes
Jan 19, 2023
touilleMan
reviewed
Jan 19, 2023
TimeEngineer
suggested changes
Jan 19, 2023
a8200a0
to
7b664ab
Compare
c8b80a6
to
e7080e6
Compare
6821c3c
to
a4b8e9b
Compare
6c68b48
to
a3ff215
Compare
c91c78f
to
5da9c30
Compare
6420364
to
339b456
Compare
5da9c30
to
f2fa4f2
Compare
…reencryption_continue
On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number`
4b27c19
to
c16bf6f
Compare
… of WorkspaceStorage
…uring call of `_RsUserStorage.new()`
Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py`
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 1, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 8, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 8, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 8, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 9, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 10, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 13, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 14, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
FirelightFlagboy
added a commit
that referenced
this pull request
Feb 14, 2023
* Move error releatted stuff to `error` mod * Move sqlite connection creation into function * Add feature `test-utils` * Add pyo3 binding for utils local_db func during test * Re-establish `persistant_mockup` fixture * Improve in-memory test mock for local storage * Add support of panic in FutureIntoCoroutine to raises PanicException in Python * Ignore `DatabaseClosed` when dropping ManifestStorage * Improve python test typing - Improve fixture typing - Improve `test_sync_monitor_stateful` typing - Improve typing on `test_good` * Simplify executor stopping * Be more picky on diesel database error that close the database * Rework how we close connection - Add check for `ManifestStorage` that we don't close the connection to the database with still data that aren't saved - For `{workspace,user}_non_speculative_init` ensure we `flush + close` at the end - For `{Chunk,Block}Storage` add method `close_connection` to close the connection to the database * Test in memory: Rework some step to prevent Mutex poisoning * Use another device than the possible already logged one * Handle specific case when trying to remove files that are stored on ram * Try to stop userfs before reseting the testbed * Freeze specific device on `test_new_sharing_trigger_event` * Let's see if tests/core/gui/test_workspaces_reencrypt.py tests are still flaky... * Close backend socket when platform isn't darwin * Simplify closure call in manage_operational_error * Simplify clear_database_dir fixture * Simplify tests/core/gui/test_workspaces_reencrypt.py::test_workspace_reencryption_continue * Correct `FutureIntoCoroutine` missing with future result On some specific condition `FutureIntoCoroutine` was able to return the value from another future. Imagine we have: ```python await sleep(50) res = await fetch_number(42) assert res == 42 ``` If the sleep is cancel but the tokio future isn't when this future terminate and try to notify `trio`. Trio would interprate that signal as it was from `fetch_number` * Add print for unknown error * Correct bug where we were cancel during the init of the rust instance of WorkspaceStorage * Create a correct teardown * Try to unflake `test_sync_monitor_stateful` * Fix flakiness in test_sync_monitor_stateful * Fix UserStorage.run leaking sqlite opened connection when cancelled during call of `_RsUserStorage.new()` * Correct typo in `tests/common/core.py` Correct a typo on the doc-comment for the fixture `global_core_monitors_freeze` in the file `tests/common/core.py` --------- Co-authored-by: Emmanuel Leblond <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.