Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/59658


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/59658/1

diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php 
b/tests/phpunit/includes/filebackend/FileBackendTest.php
index 39611cb..4ec4a70 100644
--- a/tests/phpunit/includes/filebackend/FileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendTest.php
@@ -889,6 +889,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;
@@ -2193,7 +2194,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: newchange
Gerrit-Change-Id: Ie9f0090f626384a90b0139b9f8c2d94bf0bb8f23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to