From b165810a9cce501dad5ff8fcbede4a226add7e54 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 29 Apr 2019 10:47:00 +0200 Subject: selftest: Remove test_secondary_listening. The secondary discovery mechanism is being overhauled and that tool no longer exists. Signed-off-by: Patrick Vacek --- lib/oeqa/selftest/cases/updater_qemux86_64.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/oeqa') diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index bef6cdc..c928093 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py @@ -341,11 +341,6 @@ class SecondaryTests(OESelftestTestCase): self.assertEqual(retcode, 0, "Unable to run aktualizr-secondary --help") self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) - def test_secondary_listening(self): - print('Checking aktualizr-secondary service is listening') - stdout, stderr, retcode = self.qemu_command('aktualizr-check-discovery') - self.assertEqual(retcode, 0, "Unable to connect to secondary") - class PrimaryTests(OESelftestTestCase): def setUpLocal(self): -- cgit v1.2.3-54-g00ecf From 7fe4010668fa403fac2bed240365acb66ad723bd Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 30 Apr 2019 16:04:35 +0200 Subject: selftest: retry aktualizr failure check due to resource constraints. For some reason it now often fails if you don't briefly pause first, so just retry it if it fails a few times. Signed-off-by: Patrick Vacek --- lib/oeqa/selftest/cases/updater_qemux86_64.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/oeqa') diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index c928093..9f32bcf 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py @@ -408,11 +408,18 @@ class ResourceControlTests(OESelftestTestCase): def test_aktualizr_resource_control(self): print('Checking aktualizr was killed') - stdout, stderr, retcode = self.qemu_command('systemctl --no-pager show aktualizr') + ran_ok = False + for delay in [5, 5, 5, 5]: + sleep(delay) + stdout, stderr, retcode = self.qemu_command('systemctl --no-pager show aktualizr') + if retcode == 0 and b'ExecMainStatus=9' in stdout: + ran_ok = True + break + self.assertTrue(ran_ok, 'Aktualizr was not killed') + self.assertIn(b'CPUWeight=1000', stdout, 'CPUWeight was not set correctly') self.assertIn(b'MemoryHigh=52428800', stdout, 'MemoryHigh was not set correctly') self.assertIn(b'MemoryMax=1048576', stdout, 'MemoryMax was not set correctly') - self.assertIn(b'ExecMainStatus=9', stdout, 'Aktualizr was not killed') self.qemu_command('systemctl --runtime set-property aktualizr MemoryMax=') self.qemu_command('systemctl restart aktualizr') -- cgit v1.2.3-54-g00ecf