Package: nut Version: 2.8.1-4 Followup-For: Bug #1060655 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu plucky ubuntu-patch Control: tags -1 patch
Dear Maintainer, In Ubuntu, the following changes were applied to fix this issue: - d/t/test-nut.py: scale sleeps by x10 to mitigate flaky results (The changes were made by Christian Ehrhardt <christian.ehrha...@canonical.com>) Thanks for considering the patch. -- System Information: Debian Release: trixie/sid APT prefers oracular-updates APT policy: (500, 'oracular-updates'), (500, 'oracular-security'), (500, 'oracular'), (100, 'oracular-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.11.0-13-generic (SMP w/10 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru nut-2.8.1/debian/tests/test-nut.py nut-2.8.1/debian/tests/test-nut.py --- nut-2.8.1/debian/tests/test-nut.py 2024-12-15 15:28:01.000000000 -0700 +++ nut-2.8.1/debian/tests/test-nut.py 2025-01-16 12:11:30.000000000 -0700 @@ -202,7 +202,7 @@ def _tearDown(self): '''Clean up after each test_* function''' self._stop() - time.sleep(2) + time.sleep(20) os.unlink('/etc/nut/ups.conf') os.unlink('/etc/nut/upsd.conf') os.unlink('/etc/nut/upsd.users') @@ -237,7 +237,7 @@ expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) self.assertEqual(expected, rc, result + report) - time.sleep(10) + time.sleep(100) def _stop(self): '''Stop NUT''' @@ -256,7 +256,7 @@ def _restart(self): '''Restart NUT''' self._stop() - time.sleep(2) + time.sleep(20) self._start() def _status(self): @@ -344,7 +344,7 @@ '''Test upsrw''' # Set ups.status to OB (On Battery)... self._nut_setvar('ups.model', 'Test') - time.sleep(2) + time.sleep(20) # and check the result on the client side rc, report = testlib.cmd(['/bin/upsc', 'dummy-dev1@localhost', 'ups.model']) self.assertTrue('Test' in report, 'UPS Model: ' + report + 'should be Test') @@ -358,7 +358,7 @@ '''Test upsmon notifications''' # Set ups.status to OB (On Battery)... self._nut_setvar('ups.status', 'OB') - time.sleep(1) + time.sleep(10) # and check the result on the client side rc, report = testlib.cmd(['/bin/upsc', 'dummy-dev1@localhost', 'ups.status']) self.assertTrue('OB' in report, 'UPS Status: ' + report + 'should be OB') @@ -401,7 +401,7 @@ pidfile = os.path.join(self.rundir, 'upsd.pid') timeout = 50 while timeout > 0 and os.path.exists(pidfile): - time.sleep(0.1) + time.sleep(1) timeout -= 1 self.assertFalse(os.path.exists(pidfile), "Found %s" % pidfile) self.assertFalse(testlib.check_pidfile('upsd', pidfile), 'upsd is hung')