Issues

ZF-2626: Zend_Auth_Adapter_OpenId failes unittests

Description

Testing the adapter with AllTests failes with the following message.


    Zend Framework - Zend_Auth_Adapter_OpenId
     Zend_Auth_Adapter_OpenIdTest
     ...
Warning: unlink(C:\DOKUME~1\THOMAS~1\LOKALE~1\Temp/Thomas Weidner/openid/consume
r/assoc_url_f5149b7b777179b0676fc2f334bbb486): Permission denied in C:\Voxtronic
\3rdParty\Zend Framework\library\Zend\OpenId\Consumer\Storage\File.php on line 2
11

Call Stack:
    0.0019     178336   1. {main}() C:\Voxtronic\3rdParty\php\PEAR\PHPUnit\TextU
I\Command.php:0
    0.8168    7735696   2. PHPUnit_TextUI_Command::main() C:\Voxtronic\3rdParty\
php\PEAR\PHPUnit\TextUI\Command.php:528
   24.4673  108440104   3. PHPUnit_TextUI_TestRunner->doRun() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\TextUI\Command.php:112
   24.4677  108446688   4. PHPUnit_Framework_TestSuite->run() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\TextUI\TestRunner.php:298
   24.5404  108448960   5. PHPUnit_Framework_TestSuite->run() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\Framework\TestSuite.php:633
   24.7056  108647536   6. PHPUnit_Framework_TestSuite->run() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\Framework\TestSuite.php:633
   24.7058  108649392   7. PHPUnit_Framework_TestSuite->run() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\Framework\TestSuite.php:633
   25.2972  114867440   8. PHPUnit_Framework_TestSuite->run() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\Framework\TestSuite.php:633
   25.2975  114869296   9. PHPUnit_Framework_TestSuite->run() C:\Voxtronic\3rdPa
rty\php\PEAR\PHPUnit\Framework\TestSuite.php:633
   25.3382  114877864  10. PHPUnit_Framework_TestSuite->runTest() C:\Voxtronic\3
rdParty\php\PEAR\PHPUnit\Framework\TestSuite.php:650
   25.3382  114877864  11. PHPUnit_Framework_TestCase->run() C:\Voxtronic\3rdPar
ty\php\PEAR\PHPUnit\Framework\TestSuite.php:670
   25.3383  114877864  12. PHPUnit_Framework_TestResult->run() C:\Voxtronic\3rdP
arty\php\PEAR\PHPUnit\Framework\TestCase.php:351
   25.3384  114879984  13. PHPUnit_Framework_TestCase->runBare() C:\Voxtronic\3r
dParty\php\PEAR\PHPUnit\Framework\TestResult.php:597
   25.3388  114913752  14. PHPUnit_Framework_TestCase->runTest() C:\Voxtronic\3r
dParty\php\PEAR\PHPUnit\Framework\TestCase.php:373
   25.3388  114914960  15. ReflectionMethod->invoke() C:\Voxtronic\3rdParty\php\
PEAR\PHPUnit\Framework\TestCase.php:445
   25.3388  114914960  16. Zend_Auth_Adapter_OpenIdTest->testSetIdentity() C:\Vo
xtronic\3rdParty\Zend Framework\tests\Zend\Auth\Adapter\OpenId\OpenIdTest.php:0
   25.3456  114918552  17. Zend_OpenId_Consumer_Storage_File->delAssociation() C
:\Voxtronic\3rdParty\Zend Framework\tests\Zend\Auth\Adapter\OpenId\OpenIdTest.ph
p:138
   25.3473  114919448  18. unlink() C:\Voxtronic\3rdParty\Zend Framework\library
\Zend\OpenId\Consumer\Storage\File.php:211

.
Warning: unlink(C:\DOKUME~1\THOMAS~1\LOKALE~1\Temp/Thomas Weidner/openid/consume
r/assoc_url_f5149b7b777179b0676fc2f334bbb486): Permission denied in C:\Voxtronic
\3rdParty\Zend Framework\library\Zend\OpenId\Consumer\Storage\File.php on line 2
11

Tested as adminstrator with all permissions. Testbed: Windows XP, PHP 5.2.5.

Comments

Does the test still produce this error for you with latest SVN? I'm getting different errors, which I plan to post in a separate issue.

Yes, the failure is still there with the latest trunk 8422. Also the linenumber 211 is the same.

The failure is displayed 9 times.

Relating to [ZF-2733]; it's not exactly a duplicate, but I think that the same base problem causes the symptoms seen in both this and [ZF-2733].

Assigning to [~dmitry] for review.

I am still seeing problems with the tests on Windows, PHP 5.1.4. Particularly, the test suite just hangs/spins, never completing, seemingly in an infinite loop:

PHPUnit 3.2.15 by Sebastian Bergmann.

Zend Framework - Zend_Auth_Adapter_OpenId
 Zend_Auth_Adapter_OpenIdTest
 ..E

The above results were obtained by running:

phpunit --verbose Zend_Auth_Adapter_OpenId_AllTests

Good news is that I get no such problems on Linux, either with {{Zend_Auth_Adapter_OpenId_AllTests}} or {{Zend_OpenId_AllTests}}.

I am also still seeing the initial mentioned error by running Zend_Auth_AllTests on Windows :-(

I've fixed Windows file-system issues, however the "hang up" is not real. Some tests just spend significant time in math calculations. It may be a good idea to enable ext/php_gmp.dll in your php.ini, that will significantly improve Zend_OpenId performance.

This issue should have been fixed for the 1.5 release.