from foolscap import DeadReferenceError
from foolscap.eventual import eventually
-from allmydata.util import base32, deferredutil, hashutil, log, mathutil, observer
+from allmydata.util import base32, deferredutil, hashutil, log, mathutil
from allmydata.util.assertutil import _assert, precondition
from allmydata.util.rrefutil import ServerFailure
from allmydata import codec, hashtree, uri
from zope.interface import implements
from twisted.internet import defer
from allmydata import storage
-from allmydata.check_results import CheckResults, CheckAndRepairResults
from allmydata.util import log, observer
from allmydata.util.assertutil import precondition
from allmydata.uri import CHKFileVerifierURI
from allmydata.interfaces import IEncryptedUploadable, IDownloadTarget
from twisted.internet.interfaces import IConsumer
-from allmydata.immutable import download, layout, upload
+from allmydata.immutable import download, upload
import collections
from allmydata.test import common
-from allmydata.monitor import Monitor
-from allmydata import check_results
-from allmydata.interfaces import IURI, NotEnoughSharesError
-from allmydata.immutable import upload
-from allmydata.util import hashutil, log
+from allmydata.interfaces import NotEnoughSharesError
from twisted.internet import defer
from twisted.trial import unittest
-import random, struct
-import common_util as testutil
+import random
class Test(common.ShareManglingMixin, unittest.TestCase):
def test_test_code(self):
from allmydata.test import common
from allmydata.monitor import Monitor
from allmydata import check_results
-from allmydata.interfaces import IURI, NotEnoughSharesError
-from allmydata.immutable import upload
-from allmydata.util import hashutil, log
+from allmydata.interfaces import NotEnoughSharesError
from twisted.internet import defer
from twisted.trial import unittest
-import random, struct
-import common_util as testutil
+import random
READ_LEEWAY = 18 # We'll allow you to pass this test even if you trigger eighteen times as many disk reads and block fetches as would be optimal.
DELTA_READS = 10 * READ_LEEWAY # N = 10