Asserts that the session was kept during update. Also, log out.
protected function finishUpgradeSession() {
$this
->drupalGet('user');
$this
->clickLink(t('Edit'));
$this
->assertEqual($this
->getUrl(), url('user/1/edit', array(
'absolute' => TRUE,
)), 'We are still logged in as admin at the end of the upgrade.');
$this
->drupalLogout();
}