Changes: Add functional test - invoker kills application when applauncherd dies

RevBy: Nimika Keshri
pull/1/head
Dmitry Rozenshtein 14 years ago
parent 4fec135137
commit d787336ae1

2
debian/changelog vendored

@ -1,6 +1,6 @@
applauncherd (1.1.1) unstable; urgency=low
*
* Changes: Add functional test - invoker kills application when applauncherd dies
-- Olli Leppanen <olli.leppanen@nokia.com> Wed, 7 Sep 2011 15:12:13 +0300

@ -87,6 +87,10 @@
<case name="applauncherd__test_invoker_bogus_apptype" type="Functional" description="test giving bogus apptype to invoker" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_bogus_apptype</step>
</case>
<case name="applauncherd__test_invoker_applauncherd_dies" type="Functional" description="test invoker kills app if applauncherd dies" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_applauncherd_dies</step>
</case>
<post_steps>
<step>source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons</step>
</post_steps>

@ -514,6 +514,28 @@ class InvokerTests(unittest.TestCase):
kill_process(PREFERED_APP)
def test_invoker_applauncherd_dies(self):
"""
Test that invoker kills application and exits if applauncherd dies
"""
if get_pid(PREFERED_APP) != None:
kill_process(PREFERED_APP) #just to be sure application is not running prior the test
if get_pid('applauncherd') == None:
start_applauncherd() #just to be sure applauncherd is running
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm')
pid = wait_for_app(PREFERED_APP)
self.assert_(pid != None, "The application was not launched")
stop_applauncherd()
time.sleep(20) #wait app to be terminated and invoker to exit
pid = wait_for_app(PREFERED_APP, timeout = 2) #don't need to wait long since the app supposed not running
if pid != None:
kill_process(PREFERED_APP)
self.assert_(pid == None, "The application is still running!")
# main
if __name__ == '__main__':

Loading…
Cancel
Save