Issues

ZF-7555: testIsExpired(Zend_Http_CookieTest) unit tests failure

Issue Type: Unit Tests: Problem Created: 2009-08-10T12:52:58.000+0000 Last Updated: 2009-08-11T09:20:53.000+0000 Status: Resolved Fix version(s): - 1.9.1 (11/Aug/09)

Reporter: Alexander Veremyev (alexander) Assignee: Shahar Evron (shahar) Tags: - Zend_Http_Cookie

Related issues: Attachments:

Description

{panel} 2) testIsExpired(Zend_Http_CookieTest) with data set #0 ('cookie=foo;domain=example.com;expires=Monday, 10-Aug-09 19:08:16 UTC', false) Failed asserting that matches expected value . {panel}

Comments

Posted by Alexander Veremyev (alexander) on 2009-08-11T06:43:42.000+0000

Problem doesn't appear if Zend_Http_Cookie tests runs separately. So the problem is caused by some other test.

Posted by Shahar Evron (shahar) on 2009-08-11T07:16:00.000+0000

This happens because (surprisingly) phpUnit runs the static dataProvider method before running the actual test method - probably at the beginning of the test case.

The code there tests a cookie which is 15 seconds in the future - if running the tests is very slow, and it takes more than 15 seconds between running the dataProvider function and running the test, the test will fail.

I will increase this to 12 hours in the future instead of 15 seconds - I assume this should be enough.

Posted by Shahar Evron (shahar) on 2009-08-11T08:05:46.000+0000

Fixed in trunk rev. 17555 - still need to merge to release branch

Posted by Shahar Evron (shahar) on 2009-08-11T09:20:39.000+0000

Merged to 1.9 branch in rev. 17556

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

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

Contacts