Merge remote-tracking branch 'origin/master' into 3025.fix-test_runner-hangs

This commit is contained in:
Jean-Paul Calderone 2019-05-13 07:19:59 -04:00
commit d8b65d1374
29 changed files with 7 additions and 272 deletions

View File

@ -25,7 +25,7 @@ script:
- |
set -eo pipefail
if [ "${T}" = "py35" ]; then
cat py3_valid_syntax.txt | xargs python3 -m compileall -f
python3 -m compileall -f .
else
tox -e ${T}
fi

1
newsfragments/3030.other Normal file
View File

@ -0,0 +1 @@
Updated CI to enforce Python3 syntax for entire repo.

0
newsfragments/3036.minor Normal file
View File

View File

@ -1,197 +0,0 @@
docs/
integration/
misc/
release-tools/
setup.py
src/allmydata/_auto_deps.py
src/allmydata/blacklist.py
src/allmydata/check_results.py
src/allmydata/client.py
src/allmydata/codec.py
src/allmydata/control.py
src/allmydata/deep_stats.py
src/allmydata/dirnode.py
src/allmydata/frontends/
src/allmydata/hashtree.py
src/allmydata/history.py
src/allmydata/immutable/checker.py
src/allmydata/immutable/downloader/
src/allmydata/immutable/encode.py
src/allmydata/immutable/filenode.py
src/allmydata/immutable/__init__.py
src/allmydata/immutable/layout.py
src/allmydata/immutable/literal.py
src/allmydata/immutable/offloaded.py
src/allmydata/immutable/repairer.py
src/allmydata/immutable/upload.py
src/allmydata/__init__.py
src/allmydata/interfaces.py
src/allmydata/introducer/
src/allmydata/magicfolderdb.py
src/allmydata/__main__.py
src/allmydata/monitor.py
src/allmydata/mutable/
src/allmydata/nodemaker.py
src/allmydata/node.py
src/allmydata/scripts/admin.py
src/allmydata/scripts/backupdb.py
src/allmydata/scripts/cli.py
src/allmydata/scripts/common_http.py
src/allmydata/scripts/common.py
src/allmydata/scripts/create_node.py
src/allmydata/scripts/debug.py
src/allmydata/scripts/default_nodedir.py
src/allmydata/scripts/__init__.py
src/allmydata/scripts/magic_folder_cli.py
src/allmydata/scripts/slow_operation.py
src/allmydata/scripts/stats_gatherer.py
src/allmydata/scripts/tahoe_add_alias.py
src/allmydata/scripts/tahoe_backup.py
src/allmydata/scripts/tahoe_check.py
src/allmydata/scripts/tahoe_cp.py
src/allmydata/scripts/tahoe_daemonize.py
src/allmydata/scripts/tahoe_get.py
src/allmydata/scripts/tahoe_invite.py
src/allmydata/scripts/tahoe_ls.py
src/allmydata/scripts/tahoe_manifest.py
src/allmydata/scripts/tahoe_mkdir.py
src/allmydata/scripts/tahoe_mv.py
src/allmydata/scripts/tahoe_put.py
src/allmydata/scripts/tahoe_restart.py
src/allmydata/scripts/tahoe_run.py
src/allmydata/scripts/tahoe_start.py
src/allmydata/scripts/tahoe_status.py
src/allmydata/scripts/tahoe_stop.py
src/allmydata/scripts/tahoe_unlink.py
src/allmydata/scripts/tahoe_webopen.py
src/allmydata/stats.py
src/allmydata/storage/
src/allmydata/test/bench_dirnode.py
src/allmydata/test/check_grid.py
src/allmydata/test/check_load.py
src/allmydata/test/check_memory.py
src/allmydata/test/check_speed.py
src/allmydata/test/cli/common.py
src/allmydata/test/cli/__init__.py
src/allmydata/test/cli/test_alias.py
src/allmydata/test/cli/test_backup.py
src/allmydata/test/cli/test_check.py
src/allmydata/test/cli/test_cli.py
src/allmydata/test/cli/test_create_alias.py
src/allmydata/test/cli/test_create.py
src/allmydata/test/cli/test_daemonize.py
src/allmydata/test/cli/test_invite.py
src/allmydata/test/cli/test_list.py
src/allmydata/test/cli/test_magic_folder.py
src/allmydata/test/cli/test_mv.py
src/allmydata/test/cli/test_put.py
src/allmydata/test/cli/test_start.py
src/allmydata/test/cli/test_status.py
src/allmydata/test/common.py
src/allmydata/test/common_util.py
src/allmydata/test/common_web.py
src/allmydata/test/eliotutil.py
src/allmydata/test/__init__.py
src/allmydata/test/mutable/
src/allmydata/test/no_network.py
src/allmydata/test/plugins/
src/allmydata/test/status.py
src/allmydata/test/test_auth.py
src/allmydata/test/test_backupdb.py
src/allmydata/test/test_checker.py
src/allmydata/test/test_client.py
src/allmydata/test/test_codec.py
src/allmydata/test/test_configutil.py
src/allmydata/test/test_connections.py
src/allmydata/test/test_crawler.py
src/allmydata/test/test_deepcheck.py
src/allmydata/test/test_dirnode.py
src/allmydata/test/test_download.py
src/allmydata/test/test_eliotutil.py
src/allmydata/test/test_encode.py
src/allmydata/test/test_encodingutil.py
src/allmydata/test/test_filenode.py
src/allmydata/test/test_ftp.py
src/allmydata/test/test_happiness.py
src/allmydata/test/test_hashtree.py
src/allmydata/test/test_helper.py
src/allmydata/test/test_hung_server.py
src/allmydata/test/test_i2p_provider.py
src/allmydata/test/test_immutable.py
src/allmydata/test/test_import.py
src/allmydata/test/test_inotify.py
src/allmydata/test/test_introducer.py
src/allmydata/test/test_iputil.py
src/allmydata/test/test_json_metadata.py
src/allmydata/test/test_magic_folder.py
src/allmydata/test/test_magicpath.py
src/allmydata/test/test_multi_introducers.py
src/allmydata/test/test_netstring.py
src/allmydata/test/test_node.py
src/allmydata/test/test_no_network.py
src/allmydata/test/test_observer.py
src/allmydata/test/test_repairer.py
src/allmydata/test/test_runner.py
src/allmydata/test/test_sftp.py
src/allmydata/test/test_stats.py
src/allmydata/test/test_storage_client.py
src/allmydata/test/test_storage.py
src/allmydata/test/test_system.py
src/allmydata/test/test_tor_provider.py
src/allmydata/test/test_upload.py
src/allmydata/test/test_uri.py
src/allmydata/test/test_util.py
src/allmydata/test/test_version.py
src/allmydata/test/_twisted_9607.py
src/allmydata/test/web/
src/allmydata/unknown.py
src/allmydata/uri.py
src/allmydata/util/abbreviate.py
src/allmydata/util/assertutil.py
src/allmydata/util/base32.py
src/allmydata/util/base62.py
src/allmydata/util/cachedir.py
src/allmydata/util/configutil.py
src/allmydata/util/connection_status.py
src/allmydata/util/consumer.py
src/allmydata/util/dbutil.py
src/allmydata/util/deferredutil.py
src/allmydata/util/dictutil.py
src/allmydata/util/eliotutil.py
src/allmydata/util/fake_inotify.py
src/allmydata/util/fileutil.py
src/allmydata/util/hashutil.py
src/allmydata/util/i2p_provider.py
src/allmydata/util/idlib.py
src/allmydata/util/__init__.py
src/allmydata/util/iputil.py
src/allmydata/util/keyutil.py
src/allmydata/util/limiter.py
src/allmydata/util/log.py
src/allmydata/util/mathutil.py
src/allmydata/util/namespace.py
src/allmydata/util/netstring.py
src/allmydata/util/nummedobj.py
src/allmydata/util/observer.py
src/allmydata/util/pipeline.py
src/allmydata/util/pkgresutil.py
src/allmydata/util/pollmixin.py
src/allmydata/util/progress.py
src/allmydata/util/repeatable_random.py
src/allmydata/util/rrefutil.py
src/allmydata/util/sibpath.py
src/allmydata/util/spans.py
src/allmydata/util/statistics.py
src/allmydata/util/time_format.py
src/allmydata/util/tor_provider.py
src/allmydata/util/verlib.py
src/allmydata/util/yamlutil.py
src/allmydata/_version.py
src/allmydata/watchdog/
src/allmydata/web/
src/allmydata/windows/__init__.py
src/allmydata/windows/inotify.py
src/allmydata/windows/registry.py
src/allmydata/windows/tahoesvc.py
static/
ws_client.py

View File

@ -28,7 +28,7 @@ from allmydata.util.i2p_provider import create as create_i2p_provider
from allmydata.util.tor_provider import create as create_tor_provider
from allmydata.stats import StatsProvider
from allmydata.history import History
from allmydata.interfaces import IStatsProducer, SDMF_VERSION, MDMF_VERSION
from allmydata.interfaces import IStatsProducer, SDMF_VERSION, MDMF_VERSION, DEFAULT_MAX_SEGMENT_SIZE
from allmydata.nodemaker import NodeMaker
from allmydata.blacklist import Blacklist
from allmydata import node
@ -404,7 +404,7 @@ class _Client(node.Node, pollmixin.PollMixin):
DEFAULT_ENCODING_PARAMETERS = {"k": 3,
"happy": 7,
"n": 10,
"max_segment_size": 128*KiB,
"max_segment_size": DEFAULT_MAX_SEGMENT_SIZE,
}
def __init__(self, config, main_tub, control_tub, i2p_provider, tor_provider, introducer_clients,

View File

@ -18,11 +18,7 @@ from .common import (
CLITestMixin,
parse_options,
)
from ..common import (
skipIf,
)
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
def _unsupported(what):
return "{} are not supported by Python on this platform.".format(what)
@ -310,13 +306,6 @@ class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase):
return d
# on our old dapper buildslave, this test takes a long time (usually
# 130s), so we have to bump up the default 120s timeout. The create-alias
# and initial backup alone take 60s, probably because of the handful of
# dirnodes being created (RSA key generation). The backup between check4
# and check4a takes 6s, as does the backup before check4b.
test_backup.timeout = 3000
def _check_filtering(self, filtered, all, included, excluded):
filtered = set(filtered)
all = set(all)
@ -447,11 +436,13 @@ class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase):
return self._ignore_something_test(u"Symlink", make_symlink)
@skipIf(getattr(os, "mkfifo", None) is None, _unsupported("FIFOs"))
def test_ignore_fifo(self):
"""
A FIFO encountered in the backed-up directory is skipped with a warning.
"""
if getattr(os, "mkfifo", None) is None:
raise unittest.SkipTest(_unsupported("FIFOs"))
def make_fifo(path):
# Create the thing to ignore
os.makedirs(os.path.dirname(path))

View File

@ -12,8 +12,6 @@ from allmydata.scripts import debug
from ..no_network import GridTestMixin
from .common import CLITestMixin
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class Check(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_check(self):

View File

@ -43,8 +43,6 @@ from twisted.python import usage
from allmydata.util.encodingutil import listdir_unicode, get_io_encoding
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class CLI(CLITestMixin, unittest.TestCase):
def _dump_cap(self, *args):
config = debug.DumpCapOptions()

View File

@ -14,8 +14,6 @@ from ..no_network import GridTestMixin
from .common import CLITestMixin
from ..common_util import skip_if_cannot_represent_filename
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class Cp(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_not_enough_args(self):

View File

@ -9,8 +9,6 @@ from ..no_network import GridTestMixin
from allmydata.util.encodingutil import quote_output, get_io_encoding
from .common import CLITestMixin
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase):
def _test_webopen(self, args, expected_url):

View File

@ -8,8 +8,6 @@ from ..no_network import GridTestMixin
from allmydata.util.encodingutil import quote_output, get_io_encoding
from .common import CLITestMixin
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class List(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_list(self):
self.basedir = "cli/List/list"

View File

@ -5,8 +5,6 @@ from ..no_network import GridTestMixin
from allmydata.scripts import tahoe_mv
from .common import CLITestMixin
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class Mv(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_mv_behavior(self):
self.basedir = "cli/Mv/mv_behavior"

View File

@ -11,8 +11,6 @@ from allmydata.util.encodingutil import get_io_encoding, unicode_to_argv
from allmydata.util.fileutil import abspath_expanduser_unicode
from .common import CLITestMixin
timeout = 480 # deep_check takes 360s on Zandr's linksys box, others take > 240s
class Put(GridTestMixin, CLITestMixin, unittest.TestCase):
def test_unlinked_immutable_stdin(self):
@ -471,4 +469,3 @@ class Put(GridTestMixin, CLITestMixin, unittest.TestCase):
self.failUnlessReallyEqual(rc_out_err[1], DATA))
return d

View File

@ -16,8 +16,6 @@ from .. import common_util as testutil
SEGSIZE = 128*1024
class Update(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin):
timeout = 400 # these tests are too big, 120s is not enough on slow
# platforms
def setUp(self):
GridTestMixin.setUp(self)
self.basedir = self.mktemp()

View File

@ -544,5 +544,3 @@ class TooParallel(GridTestMixin, unittest.TestCase):
return res
d.addBoth(_clean_up)
return d
test_immutable.timeout = 80

View File

@ -20,8 +20,6 @@ from .common_web import do_http
from allmydata.test.no_network import GridTestMixin
from .cli.common import CLITestMixin
timeout = 2400 # One of these took 1046.091s on Zandr's ARM box.
class MutableChecker(GridTestMixin, unittest.TestCase, ErrorMixin):
def test_good(self):
self.basedir = "deepcheck/MutableChecker/good"

View File

@ -63,7 +63,6 @@ one_nfd = u"one\u0304"
class Dirnode(GridTestMixin, unittest.TestCase,
testutil.ReallyEqualMixin, testutil.ShouldFailMixin, testutil.StallMixin, ErrorMixin):
timeout = 480 # It occasionally takes longer than 240 seconds on Francois's arm box.
def _do_create_test(self, mdmf=False):
c = self.g.clients[0]
@ -1758,7 +1757,6 @@ class Dirnode2(testutil.ReallyEqualMixin, testutil.ShouldFailMixin, unittest.Tes
class DeepStats(testutil.ReallyEqualMixin, unittest.TestCase):
timeout = 240 # It takes longer than 120 seconds on Francois's arm box.
def test_stats(self):
ds = dirnode.DeepStats(None)
ds.add("count-files")
@ -1823,7 +1821,6 @@ class UCWEingNodeMaker(NodeMaker):
class Deleter(GridTestMixin, testutil.ReallyEqualMixin, unittest.TestCase):
timeout = 3600 # It takes longer than 433 seconds on Zandr's ARM box.
def test_retry(self):
# ticket #550, a dirnode.delete which experiences an
# UncoordinatedWriteError will fail with an incorrect "you're

View File

@ -194,7 +194,6 @@ class _Base(GridTestMixin, ShouldFailMixin):
return d
class DownloadTest(_Base, unittest.TestCase):
timeout = 2400 # It takes longer than 240 seconds on Zandr's ARM box.
def test_download(self):
self.basedir = self.mktemp()
self.set_up_grid()

View File

@ -163,7 +163,6 @@ def make_data(length):
return data[:length]
class ValidatedExtendedURIProxy(unittest.TestCase):
timeout = 240 # It takes longer than 120 seconds on Francois's arm box.
K = 4
M = 10
SIZE = 200
@ -260,8 +259,6 @@ class ValidatedExtendedURIProxy(unittest.TestCase):
return defer.DeferredList(dl)
class Encode(unittest.TestCase):
timeout = 2400 # It takes longer than 240 seconds on Zandr's ARM box.
def do_encode(self, max_segment_size, datalen, NUM_SHARES, NUM_SEGMENTS,
expected_block_hashes, expected_share_hashes):
data = make_data(datalen)

View File

@ -114,7 +114,6 @@ def upload_data(uploader, data, convergence):
return uploader.upload(u)
class AssistedUpload(unittest.TestCase):
timeout = 240 # It takes longer than 120 seconds on Francois's arm box.
def setUp(self):
self.tub = t = Tub()
t.setOption("expose-remote-exception-types", False)

View File

@ -19,15 +19,6 @@ mutable_plaintext = "muta" * 10000
class HungServerDownloadTest(GridTestMixin, ShouldFailMixin, PollMixin,
unittest.TestCase):
# Many of these tests take around 60 seconds on François's ARM buildslave:
# http://tahoe-lafs.org/buildbot/builders/FranXois%20lenny-armv5tel
# allmydata.test.test_hung_server.HungServerDownloadTest.test_2_good_8_broken_duplicate_share_fail
# once ERRORed after 197 seconds on Midnight Magic's NetBSD buildslave:
# http://tahoe-lafs.org/buildbot/builders/MM%20netbsd4%20i386%20warp
# MM's buildslave varies a lot in how long it takes to run tests.
timeout = 240
def _break(self, servers):
for (id, ss) in servers:
self.g.break_server(id)

View File

@ -715,8 +715,6 @@ class SystemTest(SystemTestMixin, AsyncTestCase):
self.basedir = "introducer/SystemTest/system_v2_server"
os.makedirs(self.basedir)
return self.do_system_test()
test_system_v2_server.timeout = 480
# occasionally takes longer than 350s on "draco"
class FakeRemoteReference:
def notifyOnDisconnect(self, *args, **kwargs): pass

View File

@ -2418,7 +2418,6 @@ class RealTest(SingleMagicFolderTestMixin, AsyncTestCase):
class RealTestAliceBob(MagicFolderAliceBobTestMixin, AsyncTestCase):
"""This is skipped unless both Twisted and the platform support inotify."""
inject_inotify = False
timeout = 15
def setUp(self):
d = super(RealTestAliceBob, self).setUp()

View File

@ -39,8 +39,6 @@ from ..util.eliotutil import (
inline_callbacks,
)
timeout = 240
def get_root_from_file(src):
srcdir = os.path.dirname(os.path.dirname(os.path.normcase(os.path.realpath(src))))

View File

@ -35,8 +35,6 @@ from allmydata.test.no_network import GridTestMixin
from allmydata.test.common import ShouldFailMixin
from allmydata.test.common_util import ReallyEqualMixin
timeout = 240
class Handler(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, unittest.TestCase):
"""This is a no-network unit test of the SFTPUserHandler and the abstractions it uses."""

View File

@ -421,12 +421,6 @@ def _render_section_values(values):
class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
# SystemTestMixin tests tend to be a lot of work, and we have a few
# buildslaves that are pretty slow, and every once in a while these tests
# run up against the default 120 second timeout. So increase the default
# timeout. Individual test cases can override this, of course.
timeout = 300
def setUp(self):
self.port_assigner = SameProcessStreamEndpointAssigner()
self.port_assigner.setUp()
@ -752,7 +746,6 @@ class CountingDataUploadable(upload.Data):
return upload.Data.read(self, length)
class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
timeout = 3600 # It takes longer than 960 seconds on Zandr's ARM box.
def test_connections(self):
self.basedir = "system/SystemTest/test_connections"

View File

@ -27,11 +27,6 @@ MiB = 1024*1024
def extract_uri(results):
return results.get_uri()
# Some of these took longer than 480 seconds on Zandr's arm box, but this may
# have been due to an earlier test ERROR'ing out due to timeout, which seems
# to screw up subsequent tests.
timeout = 960
class Uploadable(unittest.TestCase):
def shouldEqual(self, data, expected):
self.failUnless(isinstance(data, list))

View File

@ -1060,7 +1060,6 @@ class Abbreviate(unittest.TestCase):
self.failUnlessIn("fhtagn", str(e))
class Limiter(unittest.TestCase):
timeout = 480 # This takes longer than 240 seconds on Francois's arm box.
def job(self, i, foo):
self.calls.append( (i, foo) )

View File

@ -57,8 +57,6 @@ from ..status import FakeStatus
# create a fake uploader/downloader, and a couple of fake dirnodes, then
# create a webserver that works against them
timeout = 480 # Most of these take longer than 240 seconds on Francois's arm box.
class FakeStatsProvider:
def get_stats(self):
stats = {'stats': {}, 'counters': {}}