Zend Framework

testIsExpired(Zend_Http_CookieTest) unit tests failure

Details

  • Type: Unit Tests: Problem Unit Tests: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.9.1
  • Component/s: Zend_Http_Cookie
  • Labels:
    None
  • Fix Version Priority:
    Nice to Have

Description

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 <boolean:true> matches expected value <boolean:false>.

Activity

Hide
Alexander Veremyev added a comment -

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

Show
Alexander Veremyev added a comment - Problem doesn't appear if Zend_Http_Cookie tests runs separately. So the problem is caused by some other test.
Hide
Shahar Evron added a comment -

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.

Show
Shahar Evron added a comment - 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.
Hide
Shahar Evron added a comment -

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

Show
Shahar Evron added a comment - Fixed in trunk rev. 17555 - still need to merge to release branch
Hide
Shahar Evron added a comment -

Merged to 1.9 branch in rev. 17556

Show
Shahar Evron added a comment - Merged to 1.9 branch in rev. 17556

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: