Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7236258

Browse filesBrowse files
committed
Fixed unit tests. Updated integration tests to better reflect real world sentinel setup
1 parent 9641575 commit 7236258
Copy full SHA for 7236258

File tree

2 files changed

+4
-4
lines changed
Filter options

2 files changed

+4
-4
lines changed

‎.github/workflows/integration-tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/integration-tests.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
env:
172172
REDIS_HOST: 'localhost:16379'
173173
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
174-
REDIS_SENTINEL_HOSTS: 'localhost:26379'
174+
REDIS_SENTINEL_HOSTS: 'localhost:26379 localhost:26379 localhost:26379'
175175
REDIS_SENTINEL_SERVICE: redis_sentinel
176176
MESSENGER_REDIS_DSN: redis://127.0.0.1:7006/messages
177177
MESSENGER_AMQP_DSN: amqp://localhost/%2f/messages

‎src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterSentinelTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterSentinelTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public function testInvalidDSNHasBothClusterAndSentinel()
4747
public function testExceptionMessageWhenFailingToRetrieveMasterInformation()
4848
{
4949
$hosts = getenv('REDIS_SENTINEL_HOSTS');
50-
$firstHost = explode(' ', $hosts)[0];
50+
$dsn = 'redis:?host['.str_replace(' ', ']&host[', $hosts).']';
5151
$this->expectException(\Symfony\Component\Cache\Exception\InvalidArgumentException::class);
52-
$this->expectExceptionMessage('Failed to retrieve master information from master name "invalid-masterset-name" and address "'.$firstHost.'".');
53-
AbstractAdapter::createConnection('redis:?host['.str_replace(' ', ']&host[', $hosts).']', ['redis_sentinel' => 'invalid-masterset-name']);
52+
$this->expectExceptionMessage('Failed to retrieve master information from master name "invalid-masterset-name" and dsn "'.$dsn.'".');
53+
AbstractAdapter::createConnection($dsn, ['redis_sentinel' => 'invalid-masterset-name']);
5454
}
5555
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.