[Phpmyadmin-devel] unit testing errors

Hi, 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. -- Marc Delisle http://infomarc.info

Hi,
Hi,
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.
I think there are some different configurations between our env with hudson env. we should go though the failures one by one and fix them. Adam

adam a écrit :
Hi,
Hi,
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.
I think there are some different configurations between our env with hudson env. we should go though the failures one by one and fix them.
Hudson? you probably mean Jenkins. Indeed it would be a very good idea to fix the failures. Do you get failures in your environment, testing upstream's master branch? Note that I get different results on my test machine, depending on the branch I test. When I test QA_4_0, there are 0 failures. -- Marc Delisle http://infomarc.info

Le 2013-06-26 10:48, Marc Delisle a écrit :
adam a écrit :
Hi,
Hi,
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.
I think there are some different configurations between our env with hudson env. we should go though the failures one by one and fix them.
Hudson? you probably mean Jenkins. Indeed it would be a very good idea to fix the failures. Do you get failures in your environment, testing upstream's master branch?
Any feedback?
Note that I get different results on my test machine, depending on the branch I test.
When I test QA_4_0, there are 0 failures.
-- Marc Delisle http://infomarc.info

Hi,
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.
I think there are some different configurations between our env with hudson env. we should go though the failures one by one and fix them.
Hudson? you probably mean Jenkins. Indeed it would be a very good idea to fix the failures. Do you get failures in your environment, testing upstream's master branch?
Any feedback?
There are 5 failures from my side (most about the $cfg). Hi ayush, What's about the PHPUnit testing result from your side? We can fix the failures firstly. Adam

Hi,
Le 2013-06-26 10:48, Marc Delisle a écrit :
adam a écrit :
Hi,
Hi,
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.
I think there are some different configurations between our env with hudson env. we should go though the failures one by one and fix them.
Hudson? you probably mean Jenkins. Indeed it would be a very good idea to fix the failures. Do you get failures in your environment, testing upstream's master branch?
but from the latest build for my pull request, the error has gone. https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/8570827 [exec] There were 3 incomplete tests: [exec] [exec] 1) PMA_ConfigTest::testCheckPermissions [exec] This test has not been implemented yet. [exec] [exec] /home/travis/build/phpmyadmin/phpmyadmin/test/classes/PMA_Config_test.php:848 [exec] [exec] 2) PMA_WhichCrlf_Test::testWhichCrlf [exec] Cannot redefine constant [exec] [exec] /home/travis/build/phpmyadmin/phpmyadmin/test/libraries/common/PMA_whichCrlf_test.php:42 [exec] [exec] 3) Environment_Test::testSession [exec] [exec] /home/travis/build/phpmyadmin/phpmyadmin/test/Environment_test.php:83 [exec] [exec] -- Others are "missing APD or/and runkit extension" thanks, Adam

Hi Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@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. -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Hi Michal,
Hi
Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@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_C... https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T... thanks, Adam

Hi Dne Mon, 1 Jul 2013 22:17:44 +0800 adam <adamgsoc2013@gmail.com> napsal(a):
Hi Michal,
Hi
Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@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_C... https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T...
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 :-). -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Hi,
Dne Mon, 1 Jul 2013 22:17:44 +0800 adam <adamgsoc2013@gmail.com> napsal(a):
Hi Michal,
Hi
Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@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_C... https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T...
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 Adam

adam a écrit :
Hi,
Dne Mon, 1 Jul 2013 22:17:44 +0800 adam <adamgsoc2013@gmail.com> napsal(a):
Hi Michal,
Hi
Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@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_C... https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T... 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 -- Marc Delisle http://infomarc.info

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@gmail.com (mailto:adamgsoc2013@gmail.com)> napsal(a):
Hi Michal,
Hi
Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@infomarc.info (mailto:marc@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_C... https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T...
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@lists.sourceforge.net (mailto:Phpmyadmin-devel@lists.sourceforge.net) https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi, On Monday, 1 July 2013 at 8:44 PM, Ayush Chaudhary wrote:
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@gmail.com (mailto:adamgsoc2013@gmail.com)> napsal(a):
Hi Michal,
Hi
Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle <marc@infomarc.info (mailto:marc@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_C... https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T...
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@lists.sourceforge.net (mailto:Phpmyadmin-devel@lists.sourceforge.net) https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
I just set backupGlobals to true in phpunit.xml and indeed that seems to have been the cause of different errors showing up everywhere.

Ayush Chaudhary a écrit :
Hi,
On Monday, 1 July 2013 at 8:44 PM, Ayush Chaudhary wrote:
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@gmail.com (mailto:adamgsoc2013@gmail.com)> napsal(a):
Hi Michal,
> Hi > > Dne Wed, 26 Jun 2013 10:05:36 -0400 Marc Delisle > <marc@infomarc.info (mailto:marc@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_C...
https://github.com/phpmyadmin/phpmyadmin/commits/master/test/libraries/PMA_T...
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
I just set backupGlobals to true in phpunit.xml and indeed that seems to have been the cause of different errors showing up everywhere.
I confirm; moreover, Michal made this change in phpunit.xml.dist 20 days ago [1] but I did not realize the impact of this commit. [1] https://github.com/phpmyadmin/phpmyadmin/commit/fad06584f54e29d19cd169ee8a2e... -- Marc Delisle http://infomarc.info

Hi Dne Mon, 01 Jul 2013 11:26:07 -0400 Marc Delisle <marc@infomarc.info> napsal(a):
I confirm; moreover, Michal made this change in phpunit.xml.dist 20 days ago [1] but I did not realize the impact of this commit.
[1] https://github.com/phpmyadmin/phpmyadmin/commit/fad06584f54e29d19cd169ee8a2e...
It was discussed here: http://thread.gmane.org/gmane.comp.php.phpmyadmin.devel/12982 -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Le 2013-07-02 03:02, Michal Čihař a écrit :
Hi
Dne Mon, 01 Jul 2013 11:26:07 -0400 Marc Delisle <marc@infomarc.info> napsal(a):
I confirm; moreover, Michal made this change in phpunit.xml.dist 20 days ago [1] but I did not realize the impact of this commit.
[1] https://github.com/phpmyadmin/phpmyadmin/commit/fad06584f54e29d19cd169ee8a2e...
It was discussed here:
http://thread.gmane.org/gmane.comp.php.phpmyadmin.devel/12982
Thanks. -- Marc Delisle http://infomarc.info
participants (4)
-
adam
-
Ayush Chaudhary
-
Marc Delisle
-
Michal Čihař