Aaron Schulz has submitted this change and it was merged.
Change subject: Cleaned up test cleanup for FileBackend and avoid use of @.
......................................................................
Cleaned up test cleanup for FileBackend and avoid use of @.
Change-Id: Ie9f0090f626384a90b0139b9f8c2d94bf0bb8f23
---
M tests/phpunit/includes/filebackend/FileBackendTest.php
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Aaron Schulz: Verified; Looks good to me, approved
diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php
b/tests/phpunit/includes/filebackend/FileBackendTest.php
index a73ccf0..3991c93 100644
--- a/tests/phpunit/includes/filebackend/FileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendTest.php
@@ -892,6 +892,7 @@
$this->backend = $this->singleBackend;
$this->tearDownFiles();
$this->doTestConcatenate( $op, $srcs, $srcsContent,
$alreadyExists, $okStatus );
+ $this->filesToPrune[] = $op['dst']; # avoid file leaking
$this->tearDownFiles();
$this->backend = $this->multiBackend;
@@ -2196,7 +2197,9 @@
function tearDownFiles() {
foreach ( $this->filesToPrune as $file ) {
- @unlink( $file );
+ if ( is_file( $file ) ) {
+ unlink( $file );
+ }
}
$containers = array( 'unittest-cont1', 'unittest-cont2' );
foreach ( $containers as $container ) {
--
To view, visit https://gerrit.wikimedia.org/r/59658
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9f0090f626384a90b0139b9f8c2d94bf0bb8f23
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits