mirror of
https://github.com/danog/AsyncOrm.git
synced 2024-11-30 04:39:45 +01:00
Cleanup
This commit is contained in:
parent
831241da55
commit
d4f5da925f
@ -19,7 +19,7 @@
|
|||||||
namespace danog\AsyncOrm;
|
namespace danog\AsyncOrm;
|
||||||
|
|
||||||
use danog\AsyncOrm\Annotations\OrmMappedArray;
|
use danog\AsyncOrm\Annotations\OrmMappedArray;
|
||||||
use danog\AsyncOrm\Internal\Driver\CachedArray;
|
use danog\AsyncOrm\Driver\CachedArray;
|
||||||
use danog\AsyncOrm\Settings\DriverSettings;
|
use danog\AsyncOrm\Settings\DriverSettings;
|
||||||
use danog\AsyncOrm\Settings\Mysql;
|
use danog\AsyncOrm\Settings\Mysql;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
|
@ -16,10 +16,9 @@
|
|||||||
* @link https://daniil.it/AsyncOrm AsyncOrm documentation
|
* @link https://daniil.it/AsyncOrm AsyncOrm documentation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace danog\AsyncOrm\Internal\Driver;
|
namespace danog\AsyncOrm\Driver;
|
||||||
|
|
||||||
use danog\AsyncOrm\DbArray;
|
use danog\AsyncOrm\DbArray;
|
||||||
use danog\AsyncOrm\Driver\MemoryArray;
|
|
||||||
use danog\AsyncOrm\FieldConfig;
|
use danog\AsyncOrm\FieldConfig;
|
||||||
use danog\AsyncOrm\Internal\Containers\CacheContainer;
|
use danog\AsyncOrm\Internal\Containers\CacheContainer;
|
||||||
use Traversable;
|
use Traversable;
|
||||||
@ -27,8 +26,6 @@ use Traversable;
|
|||||||
/**
|
/**
|
||||||
* Array caching proxy.
|
* Array caching proxy.
|
||||||
*
|
*
|
||||||
* @internal
|
|
||||||
*
|
|
||||||
* @template TKey as array-key
|
* @template TKey as array-key
|
||||||
* @template TValue
|
* @template TValue
|
||||||
*
|
*
|
@ -3,7 +3,7 @@
|
|||||||
namespace danog\AsyncOrm;
|
namespace danog\AsyncOrm;
|
||||||
|
|
||||||
use AssertionError;
|
use AssertionError;
|
||||||
use danog\AsyncOrm\Internal\Driver\CachedArray;
|
use danog\AsyncOrm\Driver\CachedArray;
|
||||||
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
||||||
use danog\AsyncOrm\Serializer\Json;
|
use danog\AsyncOrm\Serializer\Json;
|
||||||
use danog\AsyncOrm\Settings\DriverSettings;
|
use danog\AsyncOrm\Settings\DriverSettings;
|
||||||
|
@ -23,9 +23,9 @@ use Amp\Process\Process;
|
|||||||
use Amp\Redis\RedisConfig;
|
use Amp\Redis\RedisConfig;
|
||||||
use AssertionError;
|
use AssertionError;
|
||||||
use danog\AsyncOrm\DbObject;
|
use danog\AsyncOrm\DbObject;
|
||||||
|
use danog\AsyncOrm\Driver\CachedArray;
|
||||||
use danog\AsyncOrm\Driver\MemoryArray;
|
use danog\AsyncOrm\Driver\MemoryArray;
|
||||||
use danog\AsyncOrm\FieldConfig;
|
use danog\AsyncOrm\FieldConfig;
|
||||||
use danog\AsyncOrm\Internal\Driver\CachedArray;
|
|
||||||
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
||||||
use danog\AsyncOrm\KeyType;
|
use danog\AsyncOrm\KeyType;
|
||||||
use danog\AsyncOrm\Serializer\Igbinary;
|
use danog\AsyncOrm\Serializer\Igbinary;
|
||||||
@ -66,15 +66,15 @@ final class OrmTest extends TestCase
|
|||||||
private static bool $configured = false;
|
private static bool $configured = false;
|
||||||
public static function setUpBeforeClass(): void
|
public static function setUpBeforeClass(): void
|
||||||
{
|
{
|
||||||
touch('/tmp/async-orm-test');
|
\touch('/tmp/async-orm-test');
|
||||||
$lockFile = fopen('/tmp/async-orm-test', 'r+');
|
$lockFile = \fopen('/tmp/async-orm-test', 'r+');
|
||||||
flock($lockFile, LOCK_EX);
|
\flock($lockFile, LOCK_EX);
|
||||||
if (fgets($lockFile) === 'done') {
|
if (\fgets($lockFile) === 'done') {
|
||||||
flock($lockFile, LOCK_UN);
|
\flock($lockFile, LOCK_UN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self::$configured = true;
|
self::$configured = true;
|
||||||
fwrite($lockFile, "done\n");
|
\fwrite($lockFile, "done\n");
|
||||||
|
|
||||||
$f = [];
|
$f = [];
|
||||||
foreach (['redis' => 6379, 'mariadb' => 3306, 'postgres' => 5432] as $image => $port) {
|
foreach (['redis' => 6379, 'mariadb' => 3306, 'postgres' => 5432] as $image => $port) {
|
||||||
@ -106,12 +106,12 @@ final class OrmTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flock($lockFile, LOCK_UN);
|
\flock($lockFile, LOCK_UN);
|
||||||
}
|
}
|
||||||
public static function tearDownAfterClass(): void
|
public static function tearDownAfterClass(): void
|
||||||
{
|
{
|
||||||
if (self::$configured) {
|
if (self::$configured) {
|
||||||
unlink('/tmp/async-orm-test');
|
\unlink('/tmp/async-orm-test');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static function waitForStartup(ReadableStream $f): bool
|
private static function waitForStartup(ReadableStream $f): bool
|
||||||
|
Loading…
Reference in New Issue
Block a user