Skip to content

Commit

Permalink
Merge branch '4.3'
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
nicolas-grekas committed May 20, 2019
2 parents bf18378 + 14021ee commit e9c7633
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion Tests/Transport/RedisExt/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public function testUnexpectedRedisError()

public function testGetAfterReject()
{
$connection = Connection::fromDsn('redis://localhost/messenger-rejectthenget');
$redis = new \Redis();
$connection = Connection::fromDsn('redis://localhost/messenger-rejectthenget', [], $redis);
try {
$connection->setup();
} catch (TransportException $e) {
Expand All @@ -129,5 +130,20 @@ public function testGetAfterReject()

$connection = Connection::fromDsn('redis://localhost/messenger-rejectthenget');
$this->assertNotNull($connection->get());

$redis->del('messenger-rejectthenget');
}

public function testBlockingTimeout()
{
$redis = new \Redis();
$connection = Connection::fromDsn('redis://localhost/messenger-blockingtimeout', ['blocking_timeout' => 1], $redis);
try {
$connection->setup();
} catch (TransportException $e) {
}

$this->assertNull($connection->get());
$redis->del('messenger-blockingtimeout');
}
}
2 changes: 1 addition & 1 deletion Transport/RedisExt/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function get(): ?array
return $this->get();
}

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

return [
Expand Down

0 comments on commit e9c7633

Please sign in to comment.