summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-05-09 11:44:10 +0200
committerBenjamin Berg <bberg@redhat.com>2022-05-10 11:06:18 +0200
commit37f8fa2699e2b60ee73be381592600d8e527a998 (patch)
treed2342692bba4fa2c3176db7c39c89503e0e00681
parent3243ff2a56a085b81e4a3f9000e91aef87abe3bf (diff)
linux: Test fast-polling stops after 5 seconds
In some cases we fast-poll for 5 seconds after a uevent. Check that this type of fast-polling stops when appropriate.
-rwxr-xr-xsrc/linux/integration-test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py
index 94632a6..5244084 100755
--- a/src/linux/integration-test.py
+++ b/src/linux/integration-test.py
@@ -410,6 +410,12 @@ class Tests(dbusmock.DBusTestCase):
self.assertEqual(self.get_dbus_dev_property(bat0_up, 'State'), UP_DEVICE_STATE_CHARGING)
+ # We stopped polling now, so this update will *not* be read
+ time.sleep(2)
+ self.testbed.set_attribute(bat0, 'status', 'Discharging')
+ time.sleep(1)
+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'State'), UP_DEVICE_STATE_CHARGING)
+
def test_battery_ac(self):
'''properties with dynamic battery/AC'''