1
0
mirror of https://github.com/danog/file.git synced 2024-12-12 17:27:27 +01:00
file/test/Driver/ParallelDriverTest.php

27 lines
503 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;
2020-06-30 21:45:09 +02:00
use Amp\File\Driver\ParallelDriver;
use Amp\File\Test\DriverTest;
2016-08-30 21:05:14 +02:00
use Amp\Parallel\Worker\DefaultPool;
2019-08-23 20:59:26 +02:00
use Amp\Parallel\Worker\Pool;
2016-08-30 21:05:14 +02:00
class ParallelDriverTest extends DriverTest
{
2020-10-08 16:23:44 +02:00
private Pool $pool;
2020-06-30 21:45:09 +02:00
protected function createDriver(): File\Driver
2019-08-23 20:59:26 +02:00
{
$this->pool = new DefaultPool;
2020-06-30 21:45:09 +02:00
return new ParallelDriver($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
}
}