Skip to content

Commit 6050f30

Browse files
committed
ci debug
1 parent e5f5a90 commit 6050f30

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
steps:
3333
- name: "Checkout"
34-
uses: "actions/checkout@v3"
34+
uses: "actions/checkout@v4"
3535
with:
3636
fetch-depth: 2
3737
- name: "Install requirements"
@@ -47,7 +47,7 @@ jobs:
4747
tools: "flex"
4848

4949
- name: "Install dependencies with Composer"
50-
uses: "ramsey/composer-install@v2"
50+
uses: "ramsey/composer-install@v3"
5151
with:
5252
dependency-versions: "${{ matrix.dependency-versions }}"
5353

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
redis: sh -c 'cp .github/workflows/redis-configs/redis.conf /tmp/ && redis-server /tmp/redis.conf --port 6379'
22
redis-acl: sh -c 'cp .github/workflows/redis-configs/redis-acl.conf /tmp/ && redis-server /tmp/redis-acl.conf --port 7099'
3-
redis-sentinel: sh -c 'cp .github/workflows/redis-configs/redis-sentinel.conf /tmp/ && redis-server /tmp/redis-sentinel.conf --sentinel'
3+
redis-sentinel: sh -c 'cp .github/workflows/redis-configs/redis-sentinel.conf /tmp/ && redis-server /tmp/redis-sentinel.conf --sentinel >/tmp/sentinel-log'
44
redis-node1: sh -c 'cp -R .github/workflows/redis-configs/redis-node1 /tmp/ && cd /tmp/redis-node1 && redis-server redis.conf --port 7079'
55
redis-node2: sh -c 'cp -R .github/workflows/redis-configs/redis-node2 /tmp/ && cd /tmp/redis-node2 && redis-server redis.conf --port 7080'
66
redis-node3: sh -c 'cp -R .github/workflows/redis-configs/redis-node3 /tmp/ && cd /tmp/redis-node3 && redis-server redis.conf --port 7081'

src/Factory/PhpredisClientFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ private function createClientFromSentinel(string $class, array $dsns, string $al
146146

147147
$address = $sentinel->getMasterAddrByName($masterName);
148148
} catch (RedisException | RelayException $e) {
149+
var_dump(file_get_contents('/tmp/sentinel-log'));
149150
continue;
150151
}
151152

tests/Factory/PhpredisClientFactoryTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ public function testCreateSentinelConfig(
118118
?string $sentinelUser,
119119
?string $sentinelPassword
120120
): void {
121+
if (!@fsockopen('127.0.0.1', 26379)) {
122+
$this->markTestSkipped(sprintf('The %s requires a redis sentinel instance', self::class));
123+
}
124+
121125
$this->logger->method('debug')->with(...$this->withConsecutive(
122126
[$this->stringContains('Executing command "CONNECT 127.0.0.1 6379 5 <null>')],
123127
['Executing command "AUTH sncredis"'],
@@ -129,7 +133,6 @@ public function testCreateSentinelConfig(
129133
$client = $factory->create(
130134
$sentinelClass,
131135
[
132-
'redis://undefined@localhost:55555', // unreachable instance
133136
'redis://sncredis@localhost:26379',
134137
],
135138
[

0 commit comments

Comments
 (0)