From a98a09635ad776cf8eb98664e0933760eb9edbe4 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 19 Oct 2021 07:13:40 +0200 Subject: [PATCH] Fix bug in test on 24 cores CPU test --- src/Container/Test/testcontainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Container/Test/testcontainer.py b/src/Container/Test/testcontainer.py index 5eb7b255f..59034e3ba 100644 --- a/src/Container/Test/testcontainer.py +++ b/src/Container/Test/testcontainer.py @@ -71,7 +71,7 @@ class TestResourceManager(unittest.TestCase): # Check custom script cont = self.getContainer("test_container_2") import multiprocessing as mp - ref_load = [max(0.1*(i+1),1.0) for i in range(mp.cpu_count())] + ref_load = [min(0.1*(i+1),1.0) for i in range(mp.cpu_count())] cont.setPyScriptForCPULoad('cpu_loads = {}'.format(ref_load)) loads1 = cont.loadOfCPUCores() self.assertEqual(loads1, ref_load) -- 2.39.2