Issue Type: Unit Tests: Problem Created: 2008-02-12T16:34:06.000+0000 Last Updated: 2008-09-02T10:39:26.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)
Reporter: Thomas Weidner (thomas) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Session
Related issues: Attachments:
Problem running Unittests for Zend_Session:
<pre class="highlight">
C:\Voxtronic\3rdParty\Zend Framework\tests>phpunit --verbose Zend_Session_AllTests
PHPUnit 3.2.7 by Sebastian Bergmann.
Zend Framework - Zend_Session
Zend_SessionTest
.......................FFFFIF
Time: 02:25
There were 5 failures:
1) testSetExpirationSeconds(Zend_SessionTest)
iteration over default Zend_Session namespace failed; expecting result === ';a =
== apple;o === orange;p === pear', but got ''
Failed asserting that is true.
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:764
2) testSetExpireSessionHops(Zend_SessionTest)
iteration over default Zend_Session namespace failed (result=''; hop #1)
Failed asserting that is true.
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:815
3) testSetExpireSessionVarsByHops1(Zend_SessionTest)
iteration over named Zend_Session namespace failed (result=''; hop #1)
Failed asserting that is true.
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:866
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:828
4) testSetExpireSessionVarsByHops2(Zend_SessionTest)
iteration over named Zend_Session namespace failed (result=''; hop #1)
Failed asserting that is true.
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:866
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:838
5) testSetExpireSessionVarsByHopsOnUse(Zend_SessionTest)
unexpected results iterating over named Zend_Session namespace (result=''; expec
ted ';g === guava;p === plum'; hop #1)
Failed asserting that is true.
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:928
--
There was 1 incomplete test:
1) testArrays(Zend_SessionTest)
C:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Session\SessionTest.php:879
FAILURES!
Tests: 29, Failures: 5, Incomplete: 1.
Testbed: WindowsXP, PHP 5.2.5, Standard installation
Posted by Ralph Schindler (ralph) on 2008-02-14T11:03:24.000+0000
Thomas,
Are you still getting this issue? I just ran the tests and they did indeed run fine.. do you think this can be a windows issue?
<pre class="highlight">
~/Projects/code-zendframework/repo-trunk/tests$ svn info
Path: .
URL: <a href="http://framework.zend.com/svn/framework/trunk/tests">http://framework.zend.com/svn/framework/…</a>
Repository Root: <a href="http://framework.zend.com/svn/framework">http://framework.zend.com/svn/framework</a>
Repository UUID: 44c647ce-9c0f-0410-b52a-842ac1e357ba
Revision: 7995
Node Kind: directory
Schedule: normal
Last Changed Author: matthew
Last Changed Rev: 7992
Last Changed Date: 2008-02-14 08:56:22 -0600 (Thu, 14 Feb 2008)
~/Projects/code-zendframework/repo-trunk/tests$ php -v
PHP 5.2.5 (cli) (built: Feb 6 2008 11:04:46)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans
~/Projects/code-zendframework/repo-trunk/tests$ phpunit Zend_Session_AllTests
PHPUnit 3.2.11 by Sebastian Bergmann.
...........................I.
Time: 16 seconds
OK, but incomplete or skipped tests!
Tests: 29, Incomplete: 1.
~/Projects/code-zendframework/repo-trunk/tests$
Posted by Thomas Weidner (thomas) on 2008-02-14T14:24:35.000+0000
I just tested with the latest release 8008 and the errors are still there. So it must be eighter a php-version or an OS problem.
Posted by Ralph Schindler (ralph) on 2008-02-20T14:32:52.000+0000
Thomas,
I am passing this to darby to look at b/c I simply cannot duplicate.
I installed php 5.2.5, phpunit and pulled down r8216.
Changed no ini files, my setup is running stock.. this is what i get still:
<pre class="highlight">
C:\Users\Media Center\Desktop\ZF\tests>phpunit --verbose Zend_Session_AllTests
PHPUnit 3.2.14 by Sebastian Bergmann.
Zend Framework - Zend_Session
Zend_SessionTest
...........................I.
Time: 23 seconds
There was 1 incomplete test:
1) testArrays(Zend_SessionTest)
C:\Users\Media Center\Desktop\ZF\tests\Zend\Session\SessionTest.php:879
OK, but incomplete or skipped tests!
Tests: 29, Incomplete: 1.
C:\Users\Media Center\Desktop\ZF\tests>svn info
'svn' is not recognized as an internal or external command,
operable program or batch file.
I am not sure how to proceed since I cannot duplicate.
Darby claims to be able to get the same exact results as you though, so.. Darby, any ideas?
-ralph
Posted by Ralph Schindler (ralph) on 2008-02-20T14:34:08.000+0000
I cannot reproduce, any ideas?
-ralph
Posted by Darby Felton (darby) on 2008-02-20T15:24:02.000+0000
I can reproduce the results problem exactly with PHP 5.1.4 on WinXP, though I'm unsure exactly what's happening at this point. A cursory look gives me some hints:
Posted by Ralph Schindler (ralph) on 2008-02-21T08:44:39.000+0000
The only thing I am noticing is that all tests after testUnsetAllNamespace() make use of exec() to complete their tests.
Is it possible your setup is disallowing exec() or, perhaps php is not in the include path?
Perhaps if someone could see if the test is failing around line 759 of SessionTest.php
-ralph
Posted by Darby Felton (darby) on 2008-03-03T14:06:00.000+0000
I also got the following error from running "phpunit --verbose AllTests" on r8521 of the trunk:
<pre class="literal">
101) testRegenerateId(Zend_SessionTest)
Zend_Session_Exception: The session has already been started. The session id must be set first.
c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Session\SessionTest.php:126
Posted by Wil Sinclair (wil) on 2008-03-21T17:05:32.000+0000
This issue should have been fixed for the 1.5 release.
Posted by Darby Felton (darby) on 2008-04-08T12:57:57.000+0000
Fixed with SVN r9178 and r9179.
Posted by Alexander Veremyev (alexander) on 2008-07-08T09:30:37.000+0000
The problem still exists
Posted by Alexander Veremyev (alexander) on 2008-07-09T03:54:30.000+0000
The output I get now on Linux system:
{panel} PHPUnit 3.2.19 by Sebastian Bergmann.
.......................FFFFIF
Time: 23 seconds
There were 5 failures:
testSetExpirationSeconds(Zend_SessionTest) iteration over default Zend_Session namespace failed; expecting result === ';a === apple;o === orange;p === pear', but got '' Failed asserting that is true. iteration over default Zend_Session namespace failed; expecting result === ';a === apple;o === orange;p === pear', but got '' Failed asserting that is true.
testSetExpireSessionHops(Zend_SessionTest) iteration over default Zend_Session namespace failed (result=''; hop #1) Failed asserting that is true. iteration over default Zend_Session namespace failed (result=''; hop #1) Failed asserting that is true.
testSetExpireSessionVarsByHops1(Zend_SessionTest) iteration over named Zend_Session namespace failed (result=''; hop #1) Failed asserting that is true. iteration over named Zend_Session namespace failed (result=''; hop #1) Failed asserting that is true.
testSetExpireSessionVarsByHops2(Zend_SessionTest) iteration over named Zend_Session namespace failed (result=''; hop #1) Failed asserting that is true. iteration over named Zend_Session namespace failed (result=''; hop #1) Failed asserting that is true.
testSetExpireSessionVarsByHopsOnUse(Zend_SessionTest) unexpected results iterating over named Zend_Session namespace (result=''; expected ';g === guava;p === plum'; hop #1) Failed asserting that is true. unexpected results iterating over named Zend_Session namespace (result=''; expected ';g === guava;p === plum'; hop #1) Failed asserting that is true.
FAILURES! Tests: 29, Failures: 5, Incomplete: 1. {panel}
Posted by Alexander Veremyev (alexander) on 2008-07-10T01:55:35.000+0000
The problem was in the wrong assumptions about an 'exec()' execution time.
'SessionTestHelper.php' script includes 'tests/TestHelper.php' script with other heavy includes from PHPUnit package. It slows down 'SessionTestHelper.php' script execution time to 2 seconds in Linux environment and to ~35 seconds (!!!) in Windows environment.
Then, testSetExpirationSeconds() failure stops testSetExpirationSeconds() execution and leave session in the inconsistent state. That produced other four failures.
Posted by Alexander Veremyev (alexander) on 2008-07-26T10:23:08.000+0000
Changes also merged into release-1.5 branch.
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:26.000+0000
Updating for the 1.6.0 release.