QChris has uploaded a new change for review.
https://gerrit.wikimedia.org/r/190953
Change subject: [wip] Fix Dumps' checkpoint tests
......................................................................
[wip] Fix Dumps' checkpoint tests
Change-Id: I4449b42558ada8bd579a33b651f2a630a47bfe1c
---
M tests/phpunit/maintenance/backupTextPassTest.php
1 file changed, 18 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/53/190953/1
diff --git a/tests/phpunit/maintenance/backupTextPassTest.php
b/tests/phpunit/maintenance/backupTextPassTest.php
index 0a977dc..e6c79a4 100644
--- a/tests/phpunit/maintenance/backupTextPassTest.php
+++ b/tests/phpunit/maintenance/backupTextPassTest.php
@@ -244,7 +244,24 @@
$this->fail( "Could not open stream for stderr" );
}
- $iterations = 32; // We'll start with that many iterations of
revisions in stub
+ // To trigger a checkpoint file switch, the dump needs to
consume more
+ // data than can fit into a single fread (volume condition),
and the
+ // dump need to take longer than the given maxtime (time
condition).
+ //
+ // The volume condition is independent of the used machine and
only
+ // relies on backupTextPass.inc's bufferSize of the readDump
method. We
+ // can meet that condition by initializing $iterations high
enough.
+ //
+ // The time condition heavily depends on the used CPU, and we
cannot
+ // assure it a priori, and need to adapt them to the used CPU.
We
+ // perform a dump, keep it's timing ($lastDuration), and if it
did not
+ // take long enough ($minDuration), we increase the data volume
+ // ($iterations) and dump again. Repeating the increasing until
the dump
+ // took long enough (or we fail because $iterations got too
high).
+
+ $iterations = 256; // Iterations of revisions in stub. This
should
+ // generate sufficient data to exceed $bufferSize from the
readDump
+ // method of backupTextPass.inc.
$lastDuration = 0;
$minDuration = 2; // We want the dump to take at least this
many seconds
$checkpointAfter = 0.5; // Generate checkpoint after this many
seconds
@@ -415,10 +432,7 @@
}
/**
- * Broken per T70653.
- *
* @group large
- * @group Broken
*/
function testCheckpointPlain() {
$this->checkpointHelper();
@@ -434,10 +448,7 @@
* PHP extensions, we go for gzip instead, which triggers the same
relevant code
* paths while still being testable on more systems.
*
- * Broken per T70653.
- *
* @group large
- * @group Broken
*/
function testCheckpointGzip() {
$this->checkHasGzip();
--
To view, visit https://gerrit.wikimedia.org/r/190953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4449b42558ada8bd579a33b651f2a630a47bfe1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits