summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro@users.noreply.github.com>2023-02-21 14:27:50 -0500
committerSam James <sam@gentoo.org>2023-02-22 07:42:17 +0000
commit5f619b95060bb30709f7eaf135223e12d3dae18d (patch)
tree4d110727f563f74cd308e4ed2abcdb4243504819 /dev-python/pebble
parentsys-libs/ncurses: Fix cygwin build (diff)
downloadgentoo-5f619b95060bb30709f7eaf135223e12d3dae18d.tar.gz
gentoo-5f619b95060bb30709f7eaf135223e12d3dae18d.tar.bz2
gentoo-5f619b95060bb30709f7eaf135223e12d3dae18d.zip
dev-python/pebble: increase attempts for broken test on slow CPU
On very slow machines, test_process_pool_stop_stopped_callback fails due to not raising a RuntimeError. Increasing the number of long_function instances added to the pool causes it to perform as expected. See: https://github.com/noxdafox/pebble/pull/112 Bug: https://bugs.gentoo.org/831219 Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/29709 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/pebble')
-rw-r--r--dev-python/pebble/files/pebble-5.0.3-backport-pr112.patch28
-rw-r--r--dev-python/pebble/pebble-5.0.3.ebuild1
2 files changed, 29 insertions, 0 deletions
diff --git a/dev-python/pebble/files/pebble-5.0.3-backport-pr112.patch b/dev-python/pebble/files/pebble-5.0.3-backport-pr112.patch
new file mode 100644
index 000000000000..be1afee1da64
--- /dev/null
+++ b/dev-python/pebble/files/pebble-5.0.3-backport-pr112.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/831219
+https://github.com/noxdafox/pebble/pull/112
+
+From cd78923ac2a3de7e2ce248734f10170bf516f5b4 Mon Sep 17 00:00:00 2001
+From: matoro <matoro@users.noreply.github.com>
+Date: Sun, 19 Feb 2023 13:36:34 -0500
+Subject: [PATCH] increase attempts for test_process_pool_stop_stopped_callback
+
+On very slow machines, test_process_pool_stop_stopped_callback fails due
+to not raising a RuntimeError. Increasing the number of long_function
+instances added to the pool causes it to perform as expected.
+---
+ test/test_process_pool_spawn.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test_process_pool_spawn.py b/test/test_process_pool_spawn.py
+index f839b0a..d734bdf 100644
+--- a/test/test_process_pool_spawn.py
++++ b/test/test_process_pool_spawn.py
+@@ -315,7 +315,7 @@ def stop_pool_callback(_):
+ future = pool.schedule(function, args=[1])
+ future.add_done_callback(stop_pool_callback)
+ with self.assertRaises(RuntimeError):
+- for index in range(10):
++ for index in range(30):
+ time.sleep(0.1)
+ pool.schedule(long_function, args=[index])
+
diff --git a/dev-python/pebble/pebble-5.0.3.ebuild b/dev-python/pebble/pebble-5.0.3.ebuild
index 7cdc644aab09..6289e3e819d8 100644
--- a/dev-python/pebble/pebble-5.0.3.ebuild
+++ b/dev-python/pebble/pebble-5.0.3.ebuild
@@ -21,5 +21,6 @@ S=${WORKDIR}/${P^}
LICENSE="LGPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ppc ppc64 ~riscv ~s390 sparc x86"
+PATCHES=( "${FILESDIR}/pebble-5.0.3-backport-pr112.patch" )
distutils_enable_tests pytest