Skip to content

Commit

Permalink
Fix RedisSessionStorageTest
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Aug 20, 2023
1 parent 68c604f commit f48eff6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/RedisSessionStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

namespace Amp\Http\Server\Session;

use Amp\Redis\RedisConfig;
use Amp\Redis\RemoteExecutorFactory;
use Amp\Redis\Sync\RedisMutex;
use function Amp\Redis\createRedisClient;

class RedisSessionStorageTest extends SessionStorageTest
{
protected function createFactory(): SessionFactory
{
$executorFactory = new RemoteExecutorFactory(RedisConfig::fromUri($this->getUri()));
$executor = $executorFactory->createQueryExecutor();

return new SessionFactory(new RedisMutex($executor), new RedisSessionStorage($executor));
return new SessionFactory(
new RedisMutex(createRedisClient($this->getUri())),
new RedisSessionStorage(createRedisClient($this->getUri())),
);
}

final protected function getUri(): string
Expand Down

0 comments on commit f48eff6

Please sign in to comment.