metomi/rose — pull request #818 by matthewrmshin (2013-07-17 13:19:23+00:00)
Title: rose suite-clean: fix lingering DB connection

It looks like `rose suite-clean $NAME` was leaving behind an empty
directory `$HOME/cylc-run/$NAME`. It turns out to be caused by a
lingering connection to the suite DB opened by the command itself, so it
was unable to remove the seemingly empty directory, because the suite DB
is renamed as a `.nfs*` file, which only gets removed when the command
is done. This change fixes the problem.

It also tidies up some of the tests that use the `rose suite-clean` command. (And I was guilty in putting in unnecessary workarounds in the tests rather than actually fixing the problem as described by this pull request.)