Skip to content

Commit

Permalink
Update: 修复测试配置
Browse files Browse the repository at this point in the history
  • Loading branch information
NHZEX committed Feb 17, 2024
1 parent 8a92ea6 commit 46ad755
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 17 deletions.
31 changes: 23 additions & 8 deletions src/Components/workerman/tests/unit/AppServer/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,33 @@
],
],

'connectionCenter' => [
'redis' => [
'manager' => \Imi\ConnectionCenter\Handler\Pool\PoolConnectionManager::class,
'pool' => [
'maxResources' => 10,
'minResources' => 0,
],
'config' => [
'driver' => \Imi\Redis\Connector\RedisConnectionDriver::class,
'resources' => [
[
'host' => env('REDIS_SERVER_HOST', '127.0.0.1'),
'port' => env('REDIS_SERVER_PORT', 6379),
'password' => env('REDIS_SERVER_PASSWORD'),

'client' => 'phpredis',
'mode' => \Imi\Redis\Enum\RedisMode::Standalone,
],
],
],
],
],

// redis 配置
'redis' => [
// 默认连接池名
'defaultPool' => 'redis',
'connections' => [
'redis' => [
'host' => env('REDIS_SERVER_HOST', '127.0.0.1'),
'port' => env('REDIS_SERVER_PORT', 6379),
'password' => env('REDIS_SERVER_PASSWORD'),
'heartbeatInterval' => 30,
],
],
],

// 锁
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,33 @@
'defaultPool' => 'maindb',
],

'connectionCenter' => [
'redis' => [
'manager' => \Imi\ConnectionCenter\Handler\Pool\PoolConnectionManager::class,
'pool' => [
'maxResources' => 10,
'minResources' => 0,
],
'config' => [
'driver' => \Imi\Redis\Connector\RedisConnectionDriver::class,
'resources' => [
[
'host' => env('REDIS_SERVER_HOST', '127.0.0.1'),
'port' => env('REDIS_SERVER_PORT', 6379),
'password' => env('REDIS_SERVER_PASSWORD'),

'client' => 'phpredis',
'mode' => \Imi\Redis\Enum\RedisMode::Standalone,
],
],
],
],
],

// redis 配置
'redis' => [
// 默认连接池名
'defaultPool' => 'redis',
'connections' => [
'redis' => [
'host' => env('REDIS_SERVER_HOST', '127.0.0.1'),
'port' => env('REDIS_SERVER_PORT', 6379),
'password' => env('REDIS_SERVER_PASSWORD'),
],
],
],

// 锁
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/Component/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@
'redis' => [
// 默认连接池名
'defaultPool' => 'redis_test',
'connections' => [
],
],

// 连接中心配置
Expand Down

0 comments on commit 46ad755

Please sign in to comment.