From 5c2f18dfec743c104410ef514120a8b97ccc1364 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:03:14 -0400 Subject: [PATCH 1/9] Set a higher timeout. --- src/allmydata/test/test_system.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index d11a6e866..72e91f9b4 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -1749,6 +1749,10 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase): return d + # In CI this test can be very slow, so give it a longer timeout: + test_filesystem.timeout = 360 + + def test_filesystem_with_cli_in_subprocess(self): # We do this in a separate test so that test_filesystem doesn't skip if we can't run bin/tahoe. From 8fa89bd98585bd64b2510a6ec50ab44a5090bd4b Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:05:40 -0400 Subject: [PATCH 2/9] Run a little faster. --- src/allmydata/test/test_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 72e91f9b4..a6bed7f87 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -787,7 +787,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase): def test_filesystem(self): self.data = LARGE_DATA - d = self.set_up_nodes() + d = self.set_up_nodes(4) def _new_happy_semantics(ign): for c in self.clients: c.encoding_params['happy'] = 1 From d4f2038fd1ae943944c9a90e3e154371bc76d57d Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:11:23 -0400 Subject: [PATCH 3/9] Rearrange nodes so it's possible to create even fewer. --- src/allmydata/test/common_system.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/allmydata/test/common_system.py b/src/allmydata/test/common_system.py index 3491d413d..fa8d943e5 100644 --- a/src/allmydata/test/common_system.py +++ b/src/allmydata/test/common_system.py @@ -819,8 +819,8 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin): helper_furl = f.read() self.helper_furl = helper_furl - if self.numclients >= 4: - with open(os.path.join(basedirs[3], 'tahoe.cfg'), 'a+') as f: + if self.numclients >= 2: + with open(os.path.join(basedirs[1], 'tahoe.cfg'), 'a+') as f: f.write( "[client]\n" "helper.furl = {}\n".format(helper_furl) @@ -836,9 +836,9 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin): log.msg("CONNECTED") # now find out where the web port was self.webish_url = self.clients[0].getServiceNamed("webish").getURL() - if self.numclients >=4: + if self.numclients >=2: # and the helper-using webport - self.helper_webish_url = self.clients[3].getServiceNamed("webish").getURL() + self.helper_webish_url = self.clients[1].getServiceNamed("webish").getURL() def _generate_config(self, which, basedir, force_foolscap=False): config = {} @@ -854,10 +854,10 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin): ("node", "tub.location"): allclients, # client 0 runs a webserver and a helper - # client 3 runs a webserver but no helper - ("node", "web.port"): {0, 3}, + # client 1 runs a webserver but no helper + ("node", "web.port"): {0, 1}, ("node", "timeout.keepalive"): {0}, - ("node", "timeout.disconnect"): {3}, + ("node", "timeout.disconnect"): {1}, ("helper", "enabled"): {0}, } From 9f78fd5c7f2d3340a3c64f79483373292570b732 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:11:31 -0400 Subject: [PATCH 4/9] Use even fewer nodes. --- src/allmydata/test/test_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index a6bed7f87..c2fe1339f 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -787,7 +787,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase): def test_filesystem(self): self.data = LARGE_DATA - d = self.set_up_nodes(4) + d = self.set_up_nodes(2) def _new_happy_semantics(ign): for c in self.clients: c.encoding_params['happy'] = 1 From 1ca30e1d2fc00c61b56ad6603984dd4d705bd549 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:11:44 -0400 Subject: [PATCH 5/9] News entry. --- newsfragments/4022.minor | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 newsfragments/4022.minor diff --git a/newsfragments/4022.minor b/newsfragments/4022.minor new file mode 100644 index 000000000..e69de29bb From 22715abc854b68eaa38fd664d1ab207c88582894 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:17:55 -0400 Subject: [PATCH 6/9] This is fine. --- src/allmydata/test/test_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index c2fe1339f..58384e4d8 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -1750,7 +1750,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase): return d # In CI this test can be very slow, so give it a longer timeout: - test_filesystem.timeout = 360 + test_filesystem.timeout = 360 # type: ignore[attr-defined] def test_filesystem_with_cli_in_subprocess(self): From 63b082759dabe44dfbed45effd10e2cae26d037b Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 2 May 2023 12:59:00 -0400 Subject: [PATCH 7/9] Use a modern coverage.py. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d01efdf83..9837b3bab 100644 --- a/setup.py +++ b/setup.py @@ -418,7 +418,7 @@ setup(name="tahoe-lafs", # also set in __init__.py "subunitreporter==22.2.0", "python-subunit==1.4.2", "junitxml==0.7", - "coverage ~= 5.0", + "coverage==7.2.5", ], # Here are the library dependencies of the test suite. From 5a5031f02046c77a66761b5988177081631a6afc Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Wed, 3 May 2023 16:46:57 -0400 Subject: [PATCH 8/9] Try with newer Python, 3.11 might make it faster. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bb7c9efb..fe911e34d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,12 +169,12 @@ jobs: python-version: "3.9" force-foolscap: false - os: windows-latest - python-version: "3.9" + python-version: "3.11" force-foolscap: false # 22.04 has some issue with Tor at the moment: # https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3943 - os: ubuntu-20.04 - python-version: "3.11" + python-version: "3.10" force-foolscap: false steps: From dca19525b9d9f2cd6c6f63fdaba6945bb5f4759a Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Wed, 3 May 2023 16:58:47 -0400 Subject: [PATCH 9/9] =?UTF-8?q?=F0=9F=AA=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- integration/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/conftest.py b/integration/conftest.py index 7360b891b..bf04e4424 100644 --- a/integration/conftest.py +++ b/integration/conftest.py @@ -50,9 +50,9 @@ from .util import ( ) from allmydata.node import read_config -# No reason for HTTP requests to take longer than two minutes in the +# No reason for HTTP requests to take longer than four minutes in the # integration tests. See allmydata/scripts/common_http.py for usage. -os.environ["__TAHOE_CLI_HTTP_TIMEOUT"] = "120" +os.environ["__TAHOE_CLI_HTTP_TIMEOUT"] = "240" # Make Foolscap logging go into Twisted logging, so that integration test logs # include extra information