1
0
mirror of https://github.com/danog/file.git synced 2025-01-22 05:11:14 +01:00
file/test/Driver/ParallelFilesystemDriverTest.php

27 lines
609 B
PHP
Raw Normal View History

2022-12-17 15:52:21 -06:00
<?php declare(strict_types=1);
2016-08-30 14:05:14 -05:00
2020-06-30 21:45:09 +02:00
namespace Amp\File\Test\Driver;
2016-08-30 14:05:14 -05:00
use Amp\File;
2022-02-08 19:49:16 +01:00
use Amp\File\Driver\ParallelFilesystemDriver;
use Amp\File\Test\FilesystemDriverTest;
2023-02-18 09:49:06 -06:00
use Amp\Parallel\Worker\ContextWorkerPool;
2022-02-07 19:31:21 -06:00
use Amp\Parallel\Worker\WorkerPool;
2016-08-30 14:05:14 -05:00
2022-02-08 19:49:16 +01:00
class ParallelFilesystemDriverTest extends FilesystemDriverTest
{
2022-02-07 19:31:21 -06:00
private WorkerPool $pool;
2022-02-08 19:49:16 +01:00
protected function createDriver(): File\FilesystemDriver
2019-08-23 13:59:26 -05:00
{
2023-02-18 09:49:06 -06:00
$this->pool = new ContextWorkerPool();
2020-06-30 21:45:09 +02:00
2022-02-08 19:49:16 +01:00
return new ParallelFilesystemDriver($this->pool);
2019-08-23 13:59:26 -05:00
}
protected function tearDown(): void
2019-08-23 13:59:26 -05:00
{
$this->pool->shutdown();
2016-08-30 14:05:14 -05:00
}
}