[py-svn] r36985 - py/branch/config/py/test

fijal at codespeak.net fijal at codespeak.net
Fri Jan 19 12:19:03 CET 2007


Author: fijal
Date: Fri Jan 19 12:19:01 2007
New Revision: 36985

Added:
   py/branch/config/py/test/rsession-cleanup.txt
Log:
Document how I see cleanup of rsession.


Added: py/branch/config/py/test/rsession-cleanup.txt
==============================================================================
--- (empty file)
+++ py/branch/config/py/test/rsession-cleanup.txt	Fri Jan 19 12:19:01 2007
@@ -0,0 +1,42 @@
+Quick overview to make myself sure what I'm talking about.
+
+exit cases:
+
+1. normal exit (tests finished)
+2. -x and a failing test seen at sending side
+3. C-c pressed, or SystemExit raised
+
+exit conditions:
+
+- normal cleanup (exit)
+- cleanup of remote nodes (rsession only) - possibly kill child processes
+  and close gateway nicely
+- cleanup of web server (only regarding to web interface) - probably later
+
+Normal exit:
+
+easy :), just works
+
+-x and a failing test:
+
+works, but with a hack
+
+C-c hard case:
+
+we should have different layers of C-c pressed, to make sure that we can
+interrupt teardown and still exit cleanly, that's why I don't like the idea
+of having finally: beacause exceptions are ignored inside finally.
+
+We should kill Info.pid hack, which is quite awfull usecase of global
+variable.
+
+So:
+
+ first strike of C-c should go to hosts_teardown and start sending nodes info
+ that they should kill boxes.
+
+ second strike should exit this teardown, print some message like "abandoned"
+ and eventually try to kill web server.
+
+ third strike should just exit program.
+



More information about the pytest-commit mailing list