ZF-4934: testAdvancedLogging(Zend_Log_Writer_FirebugTest) unit tests error


{panel} 6) testAdvancedLogging(Zend_Log_Writer_FirebugTest) [json] (json_encode_r) type is unsupported, encoded as null. /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:100 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:100 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Wildfire/Protocol/JsonStream.php:150 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Wildfire/Protocol/JsonStream.php:97 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Wildfire/Plugin/FirePhp.php:448 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Wildfire/Plugin/FirePhp.php:401 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Log/Writer/Firebug.php:185 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Log/Writer/Abstract.php:80 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Log.php:153 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Log.php:106 {panel}


These tests are taking a really long time in multiple environments, Christoph. Like >15min apeice. :O

I am not in a position to troubleshoot this until mid December. Sorry.

I believe the problem has to do with the is_resource() call I recently committed.

OK, no worries. I'm taking a look at it now, and I'll start by checking out is_resource().

Maybe we can cast the object to string and check for the "Resource #" string as the last IF check.

  1. Using '===' is enough to perform check if it's the same object really quickly. It actually compares only object ID's

  2. The problem is actualy in a really HUGE data structure passed to the logger.

While tracing it includes Upper level of PHPUnit objects + all ZF test case objects including their properties (additional objects using during testing)! It's large enough structure even Zend_Log_Writer_FirebugTest test case is started separately (takes ~25sec), but it becomes too large if whole ZF tests suite is started.

I'm going to mark testAdvancedLogging(Zend_Log_Writer_FirebugTest) as skipped since it passes without problems in a separate mode.

See r12606 and r12607.

Christoph, do you have any time to look at this now?

I'll get this fixed soon.

Should be fixed now. I am limiting the stack trace with: