[Phpmyadmin-devel] unit testing errors

Ayush Chaudhary ayushchd at gmail.com
Mon Jul 1 16:59:44 CEST 2013


Hi,

On Monday, 1 July 2013 at 8:37 PM, Marc Delisle wrote:  
> adam a écrit :
> > Hi,
> >  
> > > Dne Mon, 1 Jul 2013 22:17:44 +0800
> > > adam <adamgsoc2013 at gmail.com (mailto:adamgsoc2013 at gmail.com)> napsal(a):
> > >  
> > > > Hi Michal,
> > > >  
> > > > > Hi
> > > > >  
> > > > > Dne Wed, 26 Jun 2013 10:05:36 -0400
> > > > > Marc Delisle <marc at infomarc.info (mailto:marc at infomarc.info)> napsal(a):
> > > > >  
> > > > > > I don't understand why I have different results when running phpunit on  
> > > > > > the ayushchd/unit_testing branch (5 failures) and on the master branch  
> > > > > > (with Michal's merge 10 minutes ago), which gives me 16 failures.
> > > > > >  
> > > > >  
> > > > > Most of the differences were most likely caused by different error
> > > > > reporting level in PHP. Since 68b10df I've enabled E_ALL error
> > > > > reporting in testsuite, so the number of failed tests should be same
> > > > > regardless this factor.
> > > > >  
> > > > > This also leads to 30! failed tests on Travis (the CI server did see
> > > > > these failures before).
> > > > >  
> > > > > As most of these tests were written by Adam, please look at them and
> > > > > fix them ASAP.
> > > > >  
> > > >  
> > > > Look at the failures,
> > > > https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/8620957
> > > >  
> > > > It is from two files:  
> > > > /home/travis/build/phpmyadmin/phpmyadmin/test/libraries/PMA_ConfigFile_test.php
> > > > /home/travis/build/phpmyadmin/phpmyadmin/test/libraries/PMA_Tracker_test.php
> > > >  
> > > > In fact, Asyush worked on these two files:
> > > > https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_ConfigFile_test.php
> > > > https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_Tracker_test.php
> > > >  
> > >  
> > > Sorry for overlooking (I mangled file names in my head between looking
> > > at Travis and Git). Indeed these were done by Ayush, so the complain
> > > should have gone to him :-).
> > >  
> >  
> >  
> > I sent a pull request:
> > https://github.com/phpmyadmin/phpmyadmin/pull/471
> >  
> > This can fix most errors. thanks
>  
> I am puzzled. With my current master at  
> 864cf690d8a7d10e37a56113d396f7c26630a9bb, phpunit 3.7.21 and PHP 5.4.10,  
> I still have 18 failures.
>  
> Here is the first example:
>  
> There were 18 failures:
>  
> 1) ImportCsv_Test::testDoImport
> Failed asserting that '
> RENAME TABLE `pma_test`.`table1`
> TO `pma_test`.`table3`;CREATE TABLE IF NOT EXISTS  
> `pma_test`.`TABLE 1` (`COL 1` varchar(48)) DEFAULT CHARACTER SET utf8  
> COLLATE utf8_general_ci;INSERT INTO `pma_test`.`TABLE 1` (`COL 1`)  
> VALUES ('1,dbbase,,ddd,SELECT * FROM `db_content` WHERE 1');' contains  
> "CREATE DATABASE IF NOT EXISTS `CSV_DB` DEFAULT CHARACTER".
>  
> phpmyadmin/test/classes/plugin/import/ImportCsv_test.php:134
> /usr/local/bin/phpunit:46
>  
>  
I am having similar results at my end too. Here[0] is the output on my machine when I run phpunit. I reckon this is something to do with the backup globals flag. Is it now set to true on the CI server? Additionally, I did not get the "Undefined index: server" error on my machine, but that could be because on my machine, $GLOBALS['server'] was being set somewhere else during phpunit's run while on the server it wasn't.

[0] https://gist.github.com/ayushchd/5901501
>  
> --  
> Marc Delisle
> http://infomarc.info
>  
> ------------------------------------------------------------------------------
> This SF.net (http://SF.net) email is sponsored by Windows:
>  
> Build for Windows Store.
>  
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net (mailto:Phpmyadmin-devel at lists.sourceforge.net)
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20130701/483e33de/attachment.html>


More information about the Developers mailing list