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

black

parent ce29843c
No related branches found
No related tags found
1 merge request!248Turn off implicit lease renewal for allocate_buckets
......@@ -43,6 +43,7 @@ class StubStorageServer(object):
def set_implicit_slot_lease_renewal(self, enabled):
pass
def get_anonymous_storage_server():
return StubStorageServer()
......
......@@ -466,10 +466,15 @@ class ShareTests(TestCase):
expected_leases = {}
# Chop off the non-integer part of the expected values because share
# files only keep integer precision.
expected_leases.update({sharenum: [int(when)] for sharenum in existing_sharenums})
expected_leases.update({
sharenum: [int(when + interval)] for sharenum in all_sharenums - existing_sharenums
})
expected_leases.update(
{sharenum: [int(when)] for sharenum in existing_sharenums}
)
expected_leases.update(
{
sharenum: [int(when + interval)]
for sharenum in all_sharenums - existing_sharenums
}
)
self.assertThat(
dict(get_lease_grant_times(self.anonymous_storage_server, storage_index)),
......
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