Fix test_transient_lifecycle

Bring it up to date to the current code.
Fix test_persistent_lifecycle