]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix bug in test on 24 cores CPU test
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 19 Oct 2021 05:13:40 +0000 (07:13 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 19 Oct 2021 05:13:40 +0000 (07:13 +0200)
src/Container/Test/testcontainer.py

index 5eb7b255f60b9f85fe1d3526ac56208290a9bb65..59034e3ba79b4d13afcf231d71f669e6cf9f6ad0 100644 (file)
@@ -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)