ZF-1989: Unit tests under default configuration require exceptionally long time

Issue Type: Unit Tests: Improvement Created: 2007-09-24T13:35:13.000+0000 Last Updated: 2008-03-21T16:25:23.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Darby Felton (darby) Assignee: Thomas Weidner (thomas) Tags: - Zend_Currency

Related issues: Attachments:


The unit tests for Zend_Currency under the default configuration appear to require an exceptionally long time to run, relative to the tests for other framework components. If there is some way to significantly improve the performance of these tests without compromising their effectiveness, we should make an effort to do this.


Posted by Thomas Weidner (thomas) on 2007-09-24T15:17:43.000+0000

On my testbed it requires 6 to 22 seconds... I added caching tests which increased speed to 3-15 seconds.

But in my opinon even 22 seconds are a normal time for a complete testbed.

<pre class="highlight">
C:\3rdParty\Zend Framework\tests>phpunit --report C:\temp\reports Zend
PHPUnit 3.1.0beta2 by Sebastian Bergmann.


Time: 14 seconds

OK (12 tests)

Generating report, this may take a moment.Der Befehl "neato" ist entweder falsch
 geschrieben oder
konnte nicht gefunden werden.

Posted by Darby Felton (darby) on 2007-09-24T15:51:54.000+0000

Maybe I just need a faster computer. ;)

I was able to get the tests to run in 16 seconds, so I'll resolve this issue.

When I ran the tests, however, I did encounter many many warnings of the following nature:

<pre class="highlight">
Warning: implode(): Argument to implode must be an array. in trunk\library\Zend\Locale\Data.php on line 265

Call Stack:
    0.0016   1. {main}() PEAR\PHPUnit\TextUI\Command.php:0
    0.6633   2. PHPUnit_TextUI_Command::main() PEAR\PHPUnit\TextUI\Command.php:463
    1.1373   3. PHPUnit_TextUI_TestRunner->doRun() PEAR\PHPUnit\TextUI\Command.php:106
    1.1376   4. PHPUnit_Framework_TestSuite->run() PEAR\PHPUnit\TextUI\TestRunner.php:299
   17.3058   5. PHPUnit_Framework_TestSuite->runTest() PEAR\PHPUnit\Framework\TestSuite.php:526
   17.3058   6. PHPUnit_Framework_TestCase->run() PEAR\PHPUnit\Framework\TestSuite.php:546
   17.3058   7. PHPUnit_Framework_TestResult->run() PEAR\PHPUnit\Framework\TestCase.php:277
   17.3059   8. PHPUnit_Framework_TestCase->runBare() PEAR\PHPUnit\Framework\TestResult.php:548
   17.3117   9. PHPUnit_Framework_TestCase->runTest() PEAR\PHPUnit\Framework\TestCase.php:299
   17.3117  10. ReflectionMethod->invoke() PEAR\PHPUnit\Framework\TestCase.php:365
   17.3117  11. Zend_CurrencyTest->testToString() trunk\tests\Zend\CurrencyTest.php:0
   17.3118  12. Zend_Currency->__construct() trunk\tests\Zend\CurrencyTest.php:495
   17.3295  13. Zend_Currency->_updateFormat() trunk\library\Zend\Currency.php:188
   17.3295  14. Zend_Locale_Data::getContent() trunk\library\Zend\Currency.php:214
   17.3296  15. implode() trunk\library\Zend\Locale\Data.php:265

I'll create a separate issue for this.

Posted by Thomas Weidner (thomas) on 2007-09-24T15:56:49.000+0000

These error has already been fixed with SVN 6504 when I added caching support.

Posted by Darby Felton (darby) on 2007-09-24T15:56:52.000+0000

Nevermind - you already fixed it. Thanks, Thomas! :)

Have you found an issue?

See the Overview section for more details.


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

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