X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fmaintenance%2FbackupTextPassTest.php;h=31bb8b7228e368b1f7bd3d5600615ffb47390552;hb=d87135d706004373b2cfdc4c588ce6d80358631f;hp=8b5928dca883f679c5a6dd747f82422df4dda45f;hpb=f01c89b786cdf6b0825421a97333b1d697b38d9d;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/maintenance/backupTextPassTest.php b/tests/phpunit/maintenance/backupTextPassTest.php index 8b5928dca8..31bb8b7228 100644 --- a/tests/phpunit/maintenance/backupTextPassTest.php +++ b/tests/phpunit/maintenance/backupTextPassTest.php @@ -114,16 +114,16 @@ class TextPassDumperTest extends DumpTestCase { $this->assertPageStart( $this->pageId2, NS_MAIN, "BackupDumperTestP2" ); $this->assertRevision( $this->revId2_1, "BackupDumperTestP2Summary1", $this->textId2_1, false, "jprywrymfhysqllua29tj3sc7z39dl2", - "BackupDumperTestP2Text1", $this->revId2_2 ); + "BackupDumperTestP2Text1" ); $this->assertRevision( $this->revId2_2, "BackupDumperTestP2Summary2", $this->textId2_2, false, "b7vj5ks32po5m1z1t1br4o7scdwwy95", - "BackupDumperTestP2Text2", $this->revId2_3 ); + "BackupDumperTestP2Text2", $this->revId2_1 ); $this->assertRevision( $this->revId2_3, "BackupDumperTestP2Summary3", $this->textId2_3, false, "jfunqmh1ssfb8rs43r19w98k28gg56r", - "BackupDumperTestP2Text3", $this->revId2_4 ); + "BackupDumperTestP2Text3", $this->revId2_2 ); $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra", $this->textId2_4, false, "6o1ciaxa6pybnqprmungwofc4lv00wv", - "BackupDumperTestP2Text4 some additional Text" ); + "BackupDumperTestP2Text4 some additional Text", $this->revId2_3 ); $this->assertPageEnd(); // Page 3 @@ -180,18 +180,18 @@ class TextPassDumperTest extends DumpTestCase { $this->assertPageStart( $this->pageId2, NS_MAIN, "BackupDumperTestP2" ); $this->assertRevision( $this->revId2_1, "BackupDumperTestP2Summary1", $this->textId2_1, false, "jprywrymfhysqllua29tj3sc7z39dl2", - "BackupDumperTestP2Text1", $this->revId2_2 ); + "BackupDumperTestP2Text1" ); $this->assertRevision( $this->revId2_2, "BackupDumperTestP2Summary2", $this->textId2_2, false, "b7vj5ks32po5m1z1t1br4o7scdwwy95", - "BackupDumperTestP2Text2", $this->revId2_3 ); + "BackupDumperTestP2Text2", $this->revId2_1 ); // Prefetch kicks in. This is still the SHA-1 of the original text, // But the actual text (with different SHA-1) comes from prefetch. $this->assertRevision( $this->revId2_3, "BackupDumperTestP2Summary3", $this->textId2_3, false, "jfunqmh1ssfb8rs43r19w98k28gg56r", - "Prefetch_________2Text3", $this->revId2_4 ); + "Prefetch_________2Text3", $this->revId2_2 ); $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra", $this->textId2_4, false, "6o1ciaxa6pybnqprmungwofc4lv00wv", - "BackupDumperTestP2Text4 some additional Text" ); + "BackupDumperTestP2Text4 some additional Text", $this->revId2_3 ); $this->assertPageEnd(); // Page 3 @@ -332,17 +332,18 @@ class TextPassDumperTest extends DumpTestCase { "BackupDumperTestP2" ); $this->assertRevision( $this->revId2_1 + $i * self::$numOfRevs, "BackupDumperTestP2Summary1", $this->textId2_1, false, "jprywrymfhysqllua29tj3sc7z39dl2", - "BackupDumperTestP2Text1", $this->revId2_2 + $i * self::$numOfRevs ); + "BackupDumperTestP2Text1" ); $this->assertRevision( $this->revId2_2 + $i * self::$numOfRevs, "BackupDumperTestP2Summary2", $this->textId2_2, false, "b7vj5ks32po5m1z1t1br4o7scdwwy95", - "BackupDumperTestP2Text2", $this->revId2_3 + $i * self::$numOfRevs ); + "BackupDumperTestP2Text2", $this->revId2_1 + $i * self::$numOfRevs ); $this->assertRevision( $this->revId2_3 + $i * self::$numOfRevs, "BackupDumperTestP2Summary3", $this->textId2_3, false, "jfunqmh1ssfb8rs43r19w98k28gg56r", - "BackupDumperTestP2Text3", $this->revId2_4 + $i * self::$numOfRevs ); + "BackupDumperTestP2Text3", $this->revId2_2 + $i * self::$numOfRevs ); $this->assertRevision( $this->revId2_4 + $i * self::$numOfRevs, "BackupDumperTestP2Summary4 extra", $this->textId2_4, false, "6o1ciaxa6pybnqprmungwofc4lv00wv", - "BackupDumperTestP2Text4 some additional Text" ); + "BackupDumperTestP2Text4 some additional Text", + $this->revId2_3 + $i * self::$numOfRevs ); $this->assertPageEnd(); $lookingForPage = 4; @@ -382,7 +383,7 @@ class TextPassDumperTest extends DumpTestCase { $this->assertEmpty( $files, "Remaining unchecked files" ); // ... and have dealt with more than one checkpoint file - $this->assertGreaterThan( 1, $checkpointFiles, "# of checkpoint files" ); + $this->assertGreaterThan( 1, $checkpointFiles, "expected more than 1 checkpoint to have been created. Checkpoint interval is $checkpointAfter seconds, maybe your computer is too fast?" ); $this->expectETAOutput(); } @@ -419,10 +420,10 @@ class TextPassDumperTest extends DumpTestCase { * file is generated that is automatically removed upon * tearDown. * @param $iterations integer: (Optional) specifies how often the block - * of 3 pages should go into the stub file. The page id - * increase further and further, while the revision and text - * ids of the first iteration are reused. The pages of - * iteration > 1 have no corresponding representation in the + * of 3 pages should go into the stub file. The page and + * revision id increase further and further, while the text + * id of the first iteration is reused. The pages and revision + * of iteration > 1 have no corresponding representation in the * database. * @return string absolute filename of the stub */ @@ -480,6 +481,8 @@ class TextPassDumperTest extends DumpTestCase { BackupDumperTestP1Summary1 0bolhl6ol7i6x0e7yq91gxgaan39j87 + wikitext + text/x-wiki @@ -490,45 +493,53 @@ class TextPassDumperTest extends DumpTestCase { ' . ( $this->pageId2 + $i * self::$numOfPages ) . ' ' . ( $this->revId2_1 + $i * self::$numOfRevs ) . ' - ' . ( $this->revId2_2 + $i * self::$numOfRevs ) . ' 2012-04-01T16:46:05Z 127.0.0.1 BackupDumperTestP2Summary1 jprywrymfhysqllua29tj3sc7z39dl2 + wikitext + text/x-wiki ' . ( $this->revId2_2 + $i * self::$numOfRevs ) . ' - ' . ( $this->revId2_3 + $i * self::$numOfRevs ) . ' + ' . ( $this->revId2_1 + $i * self::$numOfRevs ) . ' 2012-04-01T16:46:05Z 127.0.0.1 BackupDumperTestP2Summary2 b7vj5ks32po5m1z1t1br4o7scdwwy95 + wikitext + text/x-wiki ' . ( $this->revId2_3 + $i * self::$numOfRevs ) . ' - ' . ( $this->revId2_4 + $i * self::$numOfRevs ) . ' + ' . ( $this->revId2_2 + $i * self::$numOfRevs ) . ' 2012-04-01T16:46:05Z 127.0.0.1 BackupDumperTestP2Summary3 jfunqmh1ssfb8rs43r19w98k28gg56r + wikitext + text/x-wiki ' . ( $this->revId2_4 + $i * self::$numOfRevs ) . ' + ' . ( $this->revId2_3 + $i * self::$numOfRevs ) . ' 2012-04-01T16:46:05Z 127.0.0.1 BackupDumperTestP2Summary4 extra 6o1ciaxa6pybnqprmungwofc4lv00wv + wikitext + text/x-wiki @@ -547,6 +558,8 @@ class TextPassDumperTest extends DumpTestCase { Talk BackupDumperTestP1 Summary1 nktofwzd0tl192k3zfepmlzxoax1lpe + wikitext + text/x-wiki