diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index 2bc1e320e5749d8dd1f26b31db04f668543fb97d..43539866508c13216e4c6015f24884db35b2449e 100644
--- a/tests/lib/share/share.php
+++ b/tests/lib/share/share.php
@@ -101,6 +101,7 @@ class Test_Share extends \Test\TestCase {
 		OC_Group::deleteGroup($this->group2);
 		OC_Group::deleteGroup($this->groupAndUser);
 
+		$this->logout();
 		parent::tearDown();
 	}