commit c2caa325bae93859ba286c6cdc421486feec45db
parent 82d7c81bd300a7dda77d1dfbeb13da1a63a658a2
Author: James Prestwood <prestwoj@gmail.com>
Date: Fri, 13 Aug 2021 13:26:07 -0700
auto-t: fix testAgent use of Process
This test was accessing the subprocess object and calling terminate
which ends up causing issues with test-runners own process cleanup.
Instead kill() should be used.
Diffstat:
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/autotests/testAgent/agent_test.py b/autotests/testAgent/agent_test.py
@@ -58,14 +58,13 @@ class Test(unittest.TestCase):
def test_connection_with_other_agent(self):
wd = IWD()
- iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2']).pid
+ iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2'])
# Let iwctl to start and register its agent.
wd.wait(2)
self.check_connection(wd, 'ssid2')
- iwctl.terminate()
- iwctl.communicate()
+ iwctl.kill()
IWD.clear_storage()
@@ -73,7 +72,7 @@ class Test(unittest.TestCase):
wd = IWD()
- iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2']).pid
+ iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2'])
# Let iwctl to start and register its agent.
wd.wait(2)
@@ -84,8 +83,7 @@ class Test(unittest.TestCase):
wd.unregister_psk_agent(psk_agent)
- iwctl.terminate()
- iwctl.communicate()
+ iwctl.kill()
IWD.clear_storage()