Fix testsuite handling of session