The GetCmdline test verifies that we can get the command line of a running process via the procfs. To not have to care about cleanup, the test creates an ephemeral process for this. While two wall-clock seconds seem more than enough for a single read from the procfs on nowadays machines, this is not true for some of the public buildbot (virtual) machines which are extremely low on resources and can have really heavy load; this causes flakyness of that test there. Mitigate this by increasing the life time of the process.
Signed-off-by: Klaus Aehlig <[email protected]> --- test/py/ganeti.utils.process_unittest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/ganeti.utils.process_unittest.py b/test/py/ganeti.utils.process_unittest.py index 5b2107f..82fc81e 100755 --- a/test/py/ganeti.utils.process_unittest.py +++ b/test/py/ganeti.utils.process_unittest.py @@ -745,7 +745,7 @@ class RunInSeparateProcess(unittest.TestCase): class GetCmdline(unittest.TestCase): def test(self): - sample_cmd = "sleep 2; true" + sample_cmd = "sleep 20; true" pid = subprocess.Popen(sample_cmd, shell=True).pid cmdline = utils.GetProcCmdline(pid) # As the popen will quote and pass on the sample_cmd, it should be returned -- 2.6.0.rc2.230.g3dd15c0
