Skip to content
Snippets Groups Projects
Commit 23e05d02 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

add some missing cleanup

parent 2fecdb2f
No related branches found
No related tags found
1 merge request!49Correct pass count for mutable writes
......@@ -61,6 +61,9 @@ from .strategies import (
from .fixtures import (
AnonymousStorageServer,
)
from .storage_common import (
cleanup_storage_server,
)
from ..api import (
ZKAPAuthorizerStorageServer,
MorePassesRequired,
......@@ -107,13 +110,16 @@ class PassValidationTests(TestCase):
),
)
def test_allocate_buckets_fails_without_enough_passes(self):
"""
``remote_allocate_buckets`` fails with ``MorePassesRequired`` if it is
passed fewer passes than it requires for the amount of data to be
stored.
"""
# Hypothesis causes our storage server to be used many times. Clean
# up between iterations.
cleanup_storage_server(self.anonymous_storage_server)
required_passes = 2
share_nums = {3, 7}
allocated_size = int((required_passes * BYTES_PER_PASS) / len(share_nums))
......@@ -158,6 +164,10 @@ class PassValidationTests(TestCase):
initial writes on shares without supplying passes, the operation fails
with ``MorePassesRequired``.
"""
# Hypothesis causes our storage server to be used many times. Clean
# up between iterations.
cleanup_storage_server(self.anonymous_storage_server)
data = b"01234567"
offset = 0
sharenum = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment