Skip to content

[5.4] Test and fix RedisQueue for phpredis #17853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

halaei
Copy link
Contributor

@halaei halaei commented Feb 9, 2017

  • Tests for both phpredis and predis: see .travis.yml file and InteractsWithRedis trait.
  • Fix RedisQueue for phpredis: call to zadd.
  • Fix tests: phpredis may be case sensitive so 'WITHSCORES' should be converted to 'withscores'

@halaei
Copy link
Contributor Author

halaei commented Feb 10, 2017

Many phpnotice are printed to the travis-ci log. I think it has something to do with phpredis connection being open and the pcntl_fork in FileSystemTest.

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

PHP Notice:  Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0

@tillkruss
Copy link
Contributor

Is that ZADD fix still nessesary. Didn't #17832 fix that already?

@halaei
Copy link
Contributor Author

halaei commented Feb 10, 2017

I don't know, I was writing this PR before #17832, maybe necessary maybe not, but does not hurt?

@tillkruss
Copy link
Contributor

I wouldn't change it, unless it's nessesary.

@halaei
Copy link
Contributor Author

halaei commented Feb 10, 2017

Let me check then

@halaei
Copy link
Contributor Author

halaei commented Feb 10, 2017

No it does not work without the change. So the change is required.

@halaei
Copy link
Contributor Author

halaei commented Feb 10, 2017

Sorry, the change is not required :D. Only mock tests failed

@tillkruss
Copy link
Contributor

tillkruss commented Feb 10, 2017

Awesome! Great work otherwise.

@@ -123,7 +123,7 @@ public function later($delay, $job, $data = '', $queue = null)
protected function laterRaw($delay, $payload, $queue = null)
{
$this->getConnection()->zadd(
$this->getQueue($queue).':delayed', $this->availableAt($delay), $payload
$this->getQueue($queue).':delayed', [$payload => $this->availableAt($delay)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0])
[
json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0]) => 2,
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0])
[
json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0]) => 2,
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

@halaei
Copy link
Contributor Author

halaei commented Feb 10, 2017

#17882

@halaei halaei closed this Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants