return self._loop()
else:
# no more peers. If we haven't placed enough shares, we fail.
- placed_shares = self.total_shares - len(self.homeless_shares)
merged = merge_peers(self.preexisting_shares, self.use_peers)
effective_happiness = servers_of_happiness(merged)
if effective_happiness < self.servers_of_happiness:
self._add_server(server_number=5, readonly=True))
d.addCallback(lambda ign:
self.g.remove_server(self.g.servers_by_number[0].my_nodeid))
- def _reset_encoding_parameters(ign):
+ def _reset_encoding_parameters(ign, happy=4):
client = self.g.clients[0]
- client.DEFAULT_ENCODING_PARAMETERS['happy'] = 4
+ client.DEFAULT_ENCODING_PARAMETERS['happy'] = happy
return client
d.addCallback(_reset_encoding_parameters)
d.addCallback(lambda client:
self._add_server(server_number=5, readonly=True))
d.addCallback(lambda ign:
self.g.remove_server(self.g.servers_by_number[0].my_nodeid))
- def _reset_encoding_parameters(ign, happy=4):
- client = self.g.clients[0]
- client.DEFAULT_ENCODING_PARAMETERS['happy'] = happy
- return client
d.addCallback(_reset_encoding_parameters)
d.addCallback(lambda client:
self.shouldFail(UploadUnhappinessError, "test_selection_exceptions",