From: daniel Date: Mon, 30 Apr 2012 15:52:46 +0000 (+0200) Subject: adding sanity checks to find out why testDoRollback is failing on jenkins X-Git-Tag: 1.31.0-rc.0~22097^2^2~179 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=1665bc101a7462e62a6915a4657b13a36631d9e9;p=lhc%2Fweb%2Fwiklou.git adding sanity checks to find out why testDoRollback is failing on jenkins --- diff --git a/tests/phpunit/includes/WikiPageTest.php b/tests/phpunit/includes/WikiPageTest.php index 357de0cfc1..c3634d0ae9 100644 --- a/tests/phpunit/includes/WikiPageTest.php +++ b/tests/phpunit/includes/WikiPageTest.php @@ -605,6 +605,12 @@ more stuff $text .= "\n\nthree"; $page->doEditContent( ContentHandler::makeContent( $text, $page->getTitle() ), "adding section three", 0, false, $user2 ); + # we are having issues with doRollback spuriously failing. apparently the last revision somehow goes missing + # or not committed under some circumstances. so, make sure the last revision has the right user name. + $page = new WikiPage( $page->getTitle() ); + $this->assertEquals( '127.0.2.13', $page->getRevision()->getUserText() ); + + # now, try the actual rollback $admin->addGroup( "sysop" ); #XXX: make the test user a sysop... $token = $admin->getEditToken( array( $page->getTitle()->getPrefixedText(), $user2->getName() ), null ); $errors = $page->doRollback( $user2->getName(), "testing revert", $token, false, $details, $admin );