mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
clear appdata cache
This commit is contained in:
parent
143b08968a
commit
267e03ace2
4 changed files with 16 additions and 1 deletions
1
.github/workflows/phpunit-32bits.yml
vendored
1
.github/workflows/phpunit-32bits.yml
vendored
|
|
@ -64,7 +64,6 @@ jobs:
|
|||
mkdir data
|
||||
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin
|
||||
php -f tests/enable_all.php
|
||||
sleep 7200
|
||||
|
||||
- name: PHPUnit
|
||||
run: composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness
|
||||
|
|
|
|||
|
|
@ -151,4 +151,9 @@ class AppData implements IAppData {
|
|||
public function getId(): int {
|
||||
return $this->getAppDataFolder()->getId();
|
||||
}
|
||||
|
||||
public function clearFilesystemCache(): void {
|
||||
$this->folder = null;
|
||||
$this->folders->clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,10 @@ class Factory implements IAppDataFactory {
|
|||
}
|
||||
return $this->folders[$appId];
|
||||
}
|
||||
|
||||
public function clearFilesystemCache(): void {
|
||||
foreach ($this->folders as $folder) {
|
||||
$folder->clearFilesystemCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace Test;
|
|||
use DOMDocument;
|
||||
use DOMNode;
|
||||
use OC\Command\QueueBus;
|
||||
use OC\Files\AppData\Factory;
|
||||
use OC\Files\Cache\Storage;
|
||||
use OC\Files\Config\MountProviderCollection;
|
||||
use OC\Files\Filesystem;
|
||||
|
|
@ -337,6 +338,10 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
|||
self::tearDownAfterClassCleanStrayHooks();
|
||||
self::tearDownAfterClassCleanStrayLocks();
|
||||
|
||||
/** @var Factory $appDataFactory */
|
||||
$appDataFactory = Server::get(Factory::class);
|
||||
$appDataFactory->clearFilesystemCache();
|
||||
|
||||
/** @var SetupManager $setupManager */
|
||||
$setupManager = Server::get(SetupManager::class);
|
||||
$setupManager->tearDown();
|
||||
|
|
|
|||
Loading…
Reference in a new issue