Split up doOperations() test to be more robust when tests fail.
Change-Id: If7c0f1476e694feeb791754608ea964899be0c38
This commit is contained in:
parent
d1f0c5a7d8
commit
4e63cbf52b
1 changed files with 25 additions and 21 deletions
|
|
@ -1147,26 +1147,6 @@ class FileBackendTest extends MediaWikiTestCase {
|
|||
$this->tearDownFiles();
|
||||
$this->doTestDoOperations();
|
||||
$this->tearDownFiles();
|
||||
|
||||
$this->backend = $this->singleBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperations2();
|
||||
$this->tearDownFiles();
|
||||
|
||||
$this->backend = $this->multiBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperations2();
|
||||
$this->tearDownFiles();
|
||||
|
||||
$this->backend = $this->singleBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperationsFailing();
|
||||
$this->tearDownFiles();
|
||||
|
||||
$this->backend = $this->multiBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperationsFailing();
|
||||
$this->tearDownFiles();
|
||||
}
|
||||
|
||||
private function doTestDoOperations() {
|
||||
|
|
@ -1242,8 +1222,20 @@ class FileBackendTest extends MediaWikiTestCase {
|
|||
"Correct file SHA-1 of $fileC" );
|
||||
}
|
||||
|
||||
public function testDoOperationsPipeline() {
|
||||
$this->backend = $this->singleBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperationsPipeline();
|
||||
$this->tearDownFiles();
|
||||
|
||||
$this->backend = $this->multiBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperationsPipeline();
|
||||
$this->tearDownFiles();
|
||||
}
|
||||
|
||||
// concurrency orientated
|
||||
private function doTestDoOperations2() {
|
||||
private function doTestDoOperationsPipeline() {
|
||||
$base = $this->baseStorePath();
|
||||
|
||||
$fileAContents = '3tqtmoeatmn4wg4qe-mg3qt3 tq';
|
||||
|
|
@ -1329,6 +1321,18 @@ class FileBackendTest extends MediaWikiTestCase {
|
|||
"Correct file SHA-1 of $fileC" );
|
||||
}
|
||||
|
||||
public function testDoOperationsFailing() {
|
||||
$this->backend = $this->singleBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperationsFailing();
|
||||
$this->tearDownFiles();
|
||||
|
||||
$this->backend = $this->multiBackend;
|
||||
$this->tearDownFiles();
|
||||
$this->doTestDoOperationsFailing();
|
||||
$this->tearDownFiles();
|
||||
}
|
||||
|
||||
private function doTestDoOperationsFailing() {
|
||||
$base = $this->baseStorePath();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue