ZF-9265: Unit tests for Zend_Http_Client appear to hang on Socket tests

Issue Type: Bug Created: 2010-02-25T08:37:46.000+0000 Last Updated: 2012-05-29T18:57:42.000+0000 Status: Closed Fix version(s): Reporter: Michael Rehbein (tech13) Assignee: Shahar Evron (shahar) Tags: - Zend_Http_Client

Related issues: Attachments: - zf9265.r21194.patch


Unit tests for Zend_Http_Client appear to hang on Socket tests

Dynamic host: Apache 2.2.9-10 / Linux Debian Lenny PHP: 5.2.6.dfsg.1-1

Tracked it down to the calls to stream_copy_to_stream. Replacing the stream_copy_to_stream with an equivalent fread+fwrite appears to fix it.


Posted by Michael Rehbein (tech13) on 2010-02-25T09:11:42.000+0000

Patch contains - Replaced stream_copy_to_stream with matching fread/fwrite. - minor code refactoring to reduce some of the duplicate code - adjusted some unit tests to stop errors from dumping binary blobs to the command line.

Posted by Stanislav Malyshev (stas) on 2010-04-06T10:37:26.000+0000

The patch seems to just read everything into memory - which kind of defies the purpose of using streams, which is not to load the whole big file into memory.

Please also note what exactly test you are running that hangs and with which settings. I also see you are running very old PHP - please test with newer 5.2 or 5.3.

Posted by Shahar Evron (shahar) on 2010-04-08T01:38:13.000+0000

Hi Michael,

Are you sure that this can be reproduced by simply running the Socket tests and not with the Proxy adapter tests?

I was able to reproduce this only with the Proxy adapter, and that was fixed by Stas in CS-21792.

If you are able to reproduce this after this fix, please provide the info requested above. If not, please mark as resolved.

Posted by Michael Rehbein (tech13) on 2010-04-08T07:46:14.000+0000

Most likely it is due to the age of my PHP.

Have you found an issue?

See the Overview section for more details.


© 2006-2021 by Zend by Perforce. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.