From fa58832bd1d5061ea18038d378df65a96b0eaff2 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sat, 15 Apr 2023 13:05:44 +0200 Subject: [PATCH] tests: Fix charging test in test_battery_state_guessing Wait longer for the state guessing to actually kick in, 25 seconds was too slow and we were getting the old state instead. --- src/linux/integration-test.py | 2 +- src/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py index 14158d5..e0f9ad7 100755 --- a/src/linux/integration-test.py +++ b/src/linux/integration-test.py @@ -631,7 +631,7 @@ class Tests(dbusmock.DBusTestCase): # self.assertDevs({ 'battery_BAT0': { 'State' : UP_DEVICE_STATE_UNKNOWN }, 'line_power_AC' : {} }) # Charge for a while - for i in range(25): + for i in range(40): time.sleep(1) # 1W charge over 1 second energy_now += 1.0 * 1000000 / 3600 diff --git a/src/meson.build b/src/meson.build index 477bb0c..acbe4d1 100644 --- a/src/meson.build +++ b/src/meson.build @@ -139,7 +139,7 @@ if os_backend == 'linux' and gobject_introspection.found() args: ut_args, env: env, depends: [ libupower_glib_typelib, upowerd ], - timeout: 60, + timeout: 80, ) endforeach endif