diff options
author | Victor Shyba <victor1984@riseup.net> | 2016-11-19 21:54:13 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2016-11-19 21:54:13 -0300 |
commit | 0a4b6acfd4dbcedb2e25fab4284df59edee873fd (patch) | |
tree | 2ae16c5e43b0ec72cae6af568efb03671dfcc6c1 /testing | |
parent | 0ec1595a89d26fc807a9cf4bf84e9769160a6564 (diff) |
[tests] fixes test_crypto bench
encrypt returns a deferred and needs the adapted benchmark runner.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/tests/benchmarks/test_crypto.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/tests/benchmarks/test_crypto.py b/testing/tests/benchmarks/test_crypto.py index 367c3b5b..75ad9a30 100644 --- a/testing/tests/benchmarks/test_crypto.py +++ b/testing/tests/benchmarks/test_crypto.py @@ -20,7 +20,8 @@ LIMIT = int(float(os.environ.get('SIZE_LIMIT', 50 * 1000 * 1000))) def create_doc_encryption(size): @pytest.mark.benchmark(group="test_crypto_encrypt_doc") - def test_doc_encryption(soledad_client, benchmark, payload): + @pytest.inlineCallbacks + def test_doc_encryption(soledad_client, txbenchmark, payload): crypto = soledad_client()._crypto DOC_CONTENT = {'payload': payload(size)} @@ -28,7 +29,7 @@ def create_doc_encryption(size): doc_id=uuid4().hex, rev='rev', json=json.dumps(DOC_CONTENT)) - benchmark(crypto.encrypt_doc, doc) + yield txbenchmark(crypto.encrypt_doc, doc) return test_doc_encryption |