1
0
mirror of https://github.com/danog/file.git synced 2024-12-12 09:19:48 +01:00
file/test/Driver/ParallelFilesystemDriverTest.php

27 lines
589 B
PHP
Raw Normal View History

<?php
2016-08-30 21:05:14 +02:00
2020-06-30 21:45:09 +02:00
namespace Amp\File\Test\Driver;
2016-08-30 21:05:14 +02:00
use Amp\File;
2022-02-08 19:49:16 +01:00
use Amp\File\Driver\ParallelFilesystemDriver;
use Amp\File\Test\FilesystemDriverTest;
2022-02-08 02:31:21 +01:00
use Amp\Parallel\Worker\DefaultWorkerPool;
use Amp\Parallel\Worker\WorkerPool;
2016-08-30 21:05:14 +02:00
2022-02-08 19:49:16 +01:00
class ParallelFilesystemDriverTest extends FilesystemDriverTest
{
2022-02-08 02:31:21 +01:00
private WorkerPool $pool;
2022-02-08 19:49:16 +01:00
protected function createDriver(): File\FilesystemDriver
2019-08-23 20:59:26 +02:00
{
2022-02-08 02:31:21 +01:00
$this->pool = new DefaultWorkerPool();
2020-06-30 21:45:09 +02:00
2022-02-08 19:49:16 +01:00
return new ParallelFilesystemDriver($this->pool);
2019-08-23 20:59:26 +02:00
}
2020-06-30 21:45:09 +02:00
protected function tearDownAsync(): void
2019-08-23 20:59:26 +02:00
{
$this->pool->shutdown();
2016-08-30 21:05:14 +02:00
}
}