Age | Commit message (Collapse) | Author |
|
SQLCipher synchronous benchmark tests were introduced when we started
developing benchmark tests to compare synchronous and asynchronous code.
Synchronous access to sqlcipher database is not used in soledad, and
those tests are much slower than asynchronous tests (more than 10 times
using ssd drive), so we want to avoid running them on ci. This commit
introduces a "synchronous" marker and avoid running tests markes as such
in ci environment.
|
|
There were some changes needed in pytest-benchmark so we could
successfully use it for soledad benchmarks graphing:
https://github.com/ionelmc/pytest-benchmark/pull/73
https://github.com/ionelmc/pytest-benchmark/pull/74
https://github.com/ionelmc/pytest-benchmark/pull/75
The contributions were accepted but not released yet, so this commit
uses the code from upstream git repository's master branch.
|
|
|
|
|
|
|
|
Check what server has, what we have, compare, fetch missing.
- Related: #8808
|
|
|
|
This method will gather a list of local docs and a list of remote docs,
compare them and send docs which server doesn't have.
- Related: #8807
|
|
The debian package for libsqlcipher does not enable the use of usleep(),
and that might cause timeouts when doing concurrent access to sqlcipher
databases.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859685
In benchmark tests we use twisted's asynchronous dbapi for creating
thousands of documents, and if usleep() is not enabled this operation is
very likelly to fail with a "db is locked" error.
This commit adds a workaround for benchmark tests by reinstalling
pysqlcipher with the "--bundled" option, what causes libsqlcipher to be
built and bundled in the python package, with usleep() enabled.
Resolves: #8835
|
|
doc_id wasn't being stored, loaded or used anywhere except for
authentication. This commit removes it and uses a fixed value for rev
since blobs is supposed to be immutable.
- Resolves: #8813
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Downloading until there is a space then splitting the content was a
mess. Extracted this behaviour out of DecrypterBuffer into a new
component so it eases testing by introducing a single responsibility
class.
|
|
|
|
Raising was generating 500, which is a generic status code for server
side errors. This commit adds proper status code of 409 while handling
the error on client side by translating the code into a proper exception
class.
|
|
|
|
Caching .tox breaks when installing new dependencies. Caching pip
instead and asking tox to always recreate will ensure newer dependencies
are installed while getting existing ones from cache.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In order to do this from CI, please create a secret variable
(at i.e. https://0xacab.org/varac/soledad/settings/ci_cd)
called PYTEST_OPTS and use this example:
--benchmark-autosave --benchmark-storage="elasticsearch+https://USER:PASSWORD@moose.leap.se:9200"
|
|
with @tayane
|
|
With this commit all tests on py34 tox environment
are collected.
|
|
|
|
At this point tests are not yet collectable
in the new environment. But no regressions observed.
|
|
On debian stable the `python3-tox` and `python-tox` packages
come with a really old version of `pip` and `setup_tools`.
This makes unusable PEP496 that comes handy when dependencies
are "py-version-related".
As a workaround we can "inject" an upgraded version of `pip` just
before running `tox`.
|
|
|
|
Resolves: https://0xacab.org/leap/soledad/issues/8788
|
|
|
|
- use subprocess.check_call() to ensure any errors during twistd startup
will properly show up on test reports.
- use SIGTERM instead of SIGKILL to gracefully terminate twistd.
|
|
|
|
We were previously not using an empty local db for download benchmark
tests, so there was actually nothing to sync. This commit fixes that by
adding a way to force an empty local db on soledad client instantiation.
|