[Phpmyadmin-devel] Unit tests failing

Dieter Adriaenssens dieter.adriaenssens at gmail.com
Sun Jun 16 21:31:26 CEST 2013


2013/6/16 Marc Delisle <marc at infomarc.info>:
> Le 2013-06-16 12:27, Madhura Jayaratne a écrit :
>>
>>
>>
>> On Sat, Jun 15, 2013 at 9:04 PM, Marc Delisle <marc at infomarc.info
>> <mailto:marc at infomarc.info>> wrote:
>>
>>     Le 2013-06-15 11:20, Marc Delisle a écrit :
>>      > Le 2013-06-15 10:36, Ayush Chaudhary a écrit :
>>      >> Hi,
>>      >>
>>      >> I recently merged with upstream. However, a lot of unit tests
>>     seem to be
>>      >> failing on my machine. All of the failures seem to be related to
>>      >> database. I do have a database named 'pma_test'. It seems I need to
>>      >> import some SQL and also, set me database authentication details
>>     somewhere.
>>      >>
>>      >> It would be great if someone could point out those settings
>>     (phpunit.xml?)
>>      >
>>      > Hi Ayush,
>>      > with current master, I also see failures (15) here.
>>      >
>>      > A while ago, I also reported tests failures (some of them seemingly
>>      > pointing to database not connecting) and I remember that someone
>>      > (Madhura?) replied that the tests should be able to run without
>>     any db
>>      > connection. It was another test failing that gave this impression.
>>      >
>>
>>     Git bisect tells me that this commit is the one that produced 12
>>     failures:
>>
>>     https://github.com/phpmyadmin/phpmyadmin/commit/0f4e573b1e0bcb743334e4818102b428bd023d2e
>>
>>     Note that when bisecting, I marked as good other commits that were
>>     producing a smaller number of failures.
>>
>> Looks like the failures are due to some problems in backing up globals.
>> I made the commit 0f4e573b1e
>> <https://github.com/phpmyadmin/phpmyadmin/commit/0f4e573b1e0bcb743334e4818102b428bd023d2e> as
>> there should not be any need to manually backup and restore
>> GLOBALS['dbi'] as backupGlobals directive is now active. Somehow failing
>> to restore the GLOBALS['dbi'] would result in other tests using the
>> mocked database interface leading to test failures related to database
>> interface.
>>
>> I will revert the commit until the cause of this is properly investigated.
>
> Thanks Madhura,
> I am now down to three failures (with PHP 5.4.10). Am I alone?

I've included the errors (3) and failures (1) I get with PHP 5.3.5 and
PHPUnit (3.7.13) below.
But when running the unit tests I also get 3 PHP Notices that variable
$cfg is not defined in libraries/charset_conversion.lib.php (lines 18,
32, 39)

     [exec] There were 3 errors:
     [exec]
     [exec] 1) PMA_Charset_Conversion_Test::testCharsetConversion
     [exec] iconv(): Detected an illegal character in input string
     [exec]
     [exec] /var/www/phpmyadmin/libraries/iconv_wrapper.lib.php:101
     [exec] /var/www/phpmyadmin/libraries/charset_conversion.lib.php:91
     [exec] /var/www/phpmyadmin/test/libraries/PMA_charset_conversion_test.php:68
     [exec]
     [exec] 2) PMA_Iconv_Wrapper_Test::testIconvWrapper with data set
#0 ('UTF-8', 'ISO-8859-1//IGNORE', 'UTF-8', 'ISO-8859-1//IGNORE',
'Euro Symbol: €')
     [exec] iconv(): Detected an illegal character in input string
     [exec]
     [exec] /var/www/phpmyadmin/test/libraries/PMA_iconv_wrapper_test.php:39
     [exec]
     [exec] 3) PMA_Iconv_Wrapper_Test::testIconvWrapper with data set
#1 ('UTF-8', 'ISO-8859-1//IGNORE//TRANSLIT', 'UTF-8',
'ISO-8859-1//IGNORE', 'Euro Symbol: €')
     [exec] iconv(): Detected an illegal character in input string
     [exec]
     [exec] /var/www/phpmyadmin/test/libraries/PMA_iconv_wrapper_test.php:39
     [exec]
     [exec] --
     [exec]
     [exec] There was 1 failure:
     [exec]
     [exec] 1) ImportShp_Test::testGetProperties
     [exec] Failed asserting that null matches expected 'text/plain'.
     [exec]
     [exec] /var/www/phpmyadmin/test/classes/plugin/import/ImportShp_test.php:75




--
Kind regards,

Dieter Adriaenssens




More information about the Developers mailing list