Skip to content

Commit e9c7633

Browse files
Merge branch '4.3'
* 4.3: (23 commits) minor: add some test in the ldap component [Workflow] Update MethodMarkingStore [Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces adding experimental note [HttpClient] add missing argument check [Messenger] Fix undefined index on read timeout [Workflow] use method marking store [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name fixed a phpdoc [Debug] Wrap call to require_once in a try/catch [EventDispatcher] Removed "callable" type hint from WrappedListener constructor prevent deprecation when filesize matches error code [PropertyInfo] Add missing documentation link in Readme Use the current working dir as default first arg in 'link' binary Respect parent class contract in ContainerAwareDoctrineEventManager [WebProfilerBundle][Form] The form data collector return serialized object when profiler bundle attends object [Validator] Add the missing translations for the Danish ("da") locale [PropertyAccess] Add missing property to PropertyAccessor [Cache] fix saving unrelated keys in recursive callback calls [Serializer] Fix denormalization of object with variadic constructor typed argument ...
2 parents bf18378 + 14021ee commit e9c7633

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Tests/Transport/RedisExt/ConnectionTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public function testUnexpectedRedisError()
115115

116116
public function testGetAfterReject()
117117
{
118-
$connection = Connection::fromDsn('redis://localhost/messenger-rejectthenget');
118+
$redis = new \Redis();
119+
$connection = Connection::fromDsn('redis://localhost/messenger-rejectthenget', [], $redis);
119120
try {
120121
$connection->setup();
121122
} catch (TransportException $e) {
@@ -129,5 +130,20 @@ public function testGetAfterReject()
129130

130131
$connection = Connection::fromDsn('redis://localhost/messenger-rejectthenget');
131132
$this->assertNotNull($connection->get());
133+
134+
$redis->del('messenger-rejectthenget');
135+
}
136+
137+
public function testBlockingTimeout()
138+
{
139+
$redis = new \Redis();
140+
$connection = Connection::fromDsn('redis://localhost/messenger-blockingtimeout', ['blocking_timeout' => 1], $redis);
141+
try {
142+
$connection->setup();
143+
} catch (TransportException $e) {
144+
}
145+
146+
$this->assertNull($connection->get());
147+
$redis->del('messenger-blockingtimeout');
132148
}
133149
}

Transport/RedisExt/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function get(): ?array
102102
return $this->get();
103103
}
104104

105-
foreach ($messages[$this->stream] as $key => $message) {
105+
foreach ($messages[$this->stream] ?? [] as $key => $message) {
106106
$redisEnvelope = \json_decode($message['message'], true);
107107

108108
return [

0 commit comments

Comments
 (0)