Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Unit testing now working - break it and be reverted

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


innocentkiller at gmail

Jun 15, 2011, 2:02 PM

Post #1 of 14 (1091 views)
Permalink
Unit testing now working - break it and be reverted

Hi everyone,

Painstakingly, all of the unit tests are now passing on cruise control (Sqlite)
and my local install (Sqlite & Mysql). This is as of r90150 [0]. Thank you
immensely to Brion for finally tracking down and eliminating that pesky
BlockTest bug.

This means? We know that according to what we have covered by PHPUnit
(barring things marked incomplete/skipped), everything is currently working.

I'd like for Max to turn IRC annoyances back on with the codurr bot for CC
failures. From here on out, I'm going to take the stance that if you break a
test, it must be fixed or reverted on sight.

-Chad

[0] http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90150

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


overlordq at gmail

Jun 15, 2011, 5:31 PM

Post #2 of 14 (1055 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On 6/15/2011 4:02 PM, Chad wrote:
> Hi everyone,
>
> Painstakingly, all of the unit tests are now passing on cruise control (Sqlite)
> and my local install (Sqlite & Mysql). This is as of r90150 [0]. Thank you
> immensely to Brion for finally tracking down and eliminating that pesky
> BlockTest bug.

Where do we file test issues at, BZ?

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


p858snake at gmail

Jun 15, 2011, 5:34 PM

Post #3 of 14 (1055 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Thu, Jun 16, 2011 at 10:31 AM, Q <overlordq [at] gmail> wrote:
> On 6/15/2011 4:02 PM, Chad wrote:
>> Hi everyone,
>>
>> Painstakingly, all of the unit tests are now passing on cruise control (Sqlite)
>> and my local install (Sqlite & Mysql). This is as of r90150 [0]. Thank you
>> immensely to Brion for finally tracking down and eliminating that pesky
>> BlockTest bug.
>
> Where do we file test issues at, BZ?
Yes (MediaWiki -> Unit tests)

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


brion at pobox

Jun 15, 2011, 5:38 PM

Post #4 of 14 (1053 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Wed, Jun 15, 2011 at 2:02 PM, Chad <innocentkiller [at] gmail> wrote:

> This means? We know that according to what we have covered by PHPUnit
> (barring things marked incomplete/skipped), everything is currently
> working.
>
> I'd like for Max to turn IRC annoyances back on with the codurr bot for CC
> failures. From here on out, I'm going to take the stance that if you break
> a
> test, it must be fixed or reverted on sight.
>

Woooooo!!!!!!!!!!!!! It's a brave new world of working tests. :D

-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


hashar+wmf at free

Jun 16, 2011, 12:44 PM

Post #5 of 14 (1050 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On 15/06/11 23:02, Chad wrote:
> Hi everyone,
>
> Painstakingly, all of the unit tests are now passing on cruise control (Sqlite)
> and my local install (Sqlite& Mysql). This is as of r90150 [0]. Thank you
> immensely to Brion for finally tracking down and eliminating that pesky
> BlockTest bug.

Congratulations to everyone involved in solving this long standing issue!


> This means? We know that according to what we have covered by PHPUnit
> (barring things marked incomplete/skipped), everything is currently working.

Please note the 1.18 build target does not include tests in the
'database' group (cause they are heavily slow). So one could break
REL1_18 without noticing.

> I'd like for Max to turn IRC annoyances back on with the codurr bot for CC
> failures. From here on out, I'm going to take the stance that if you break a
> test, it must be fixed or reverted on sight.

The REL1_18 build is published in a file named irc-publish-REL1_18.txt

:)

--
Ashar Voultoiz


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


innocentkiller at gmail

Jun 16, 2011, 12:48 PM

Post #6 of 14 (1047 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Thu, Jun 16, 2011 at 3:44 PM, Ashar Voultoiz <hashar+wmf [at] free> wrote:
> Please note the 1.18 build target does not include tests in the
> 'database' group (cause they are heavily slow).  So one could break
> REL1_18 without noticing.
>

Well none of this phpunit work since the branch point has been
backported, so I imagine REL1_18 is still pretty broken too.

-Chad

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


bryan.tongminh at gmail

Jun 16, 2011, 2:08 PM

Post #7 of 14 (1046 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

Can somebody on Windows/SQLite try running the tests? I'm consistently
getting two failures in XmlTest, which Chad apparently is not getting:


1) XmlSelectTest::testSetDefault
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
<select><option value="foo1">foo1</option>
<option value="bar1" selected="selected">bar1</option>
<option value="foo2">foo2</option></select>

D:\Bryan\workspace\phase3\tests\phpunit\includes\XmlSelectTest.php:84
D:\Bryan\workspace\phase3\tests\phpunit\MediaWikiTestCase.php:64
D:\Bryan\workspace\phase3\tests\phpunit\MediaWikiPHPUnitCommand.php:20
D:\Bryan\workspace\phase3\tests\phpunit\phpunit.php:60

2) XmlTest::testDateMenu
Date menu for february 2011
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
<label for="year">From year (and earlier):</label> <input name="year"
size="4" value="2011" id="year" maxlength="4" />
<label for="month">From month (and earlier):</label> <select
id="month" name="month" class="mw-month-selector"><option v
alue="-1">all</option>
<option value="1">January</option>
<option value="2" selected="selected">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option></select>

D:\Bryan\workspace\phase3\tests\phpunit\includes\XmlTest.php:118
D:\Bryan\workspace\phase3\tests\phpunit\MediaWikiTestCase.php:64
D:\Bryan\workspace\phase3\tests\phpunit\MediaWikiPHPUnitCommand.php:20
D:\Bryan\workspace\phase3\tests\phpunit\phpunit.php:60

--

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


overlordq at gmail

Jun 16, 2011, 2:21 PM

Post #8 of 14 (1052 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Thu, Jun 16, 2011 at 4:08 PM, Bryan Tong Minh
<bryan.tongminh [at] gmail> wrote:
> Can somebody on Windows/SQLite try running the tests? I'm consistently
> getting two failures in XmlTest, which Chad apparently is not getting:

To hijack, what output from the unit tests should be reported,

Errors and failures?

From Linux/Pg (possibly caused by LocalSettings config?):

There was 1 error:

1) BlockTest::testInitializerFunctionsReturnCorrectBlock
Argument 1 passed to Block::equals() must be an instance of Block,
null given, called in
/var/www/thedarkcitadel.com/w/tests/phpunit/includes/BlockTest.php on
line 72 and defined

/var/www/thedarkcitadel.com/w/includes/Block.php:133
/var/www/thedarkcitadel.com/w/tests/phpunit/includes/BlockTest.php:72
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60

There were 4 failures:

1) ApiUploadTest::testUpload
Failed asserting that <boolean:false> is true.

/var/www/thedarkcitadel.com/w/tests/phpunit/includes/api/ApiUploadTest.php:144
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60

2) ApiUploadTest::testUploadSameFileName
Failed asserting that <boolean:false> is true.

/var/www/thedarkcitadel.com/w/tests/phpunit/includes/api/ApiUploadTest.php:242
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60

3) ApiUploadTest::testUploadSameContent
Failed asserting that <boolean:false> is true.

/var/www/thedarkcitadel.com/w/tests/phpunit/includes/api/ApiUploadTest.php:316
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60

4) ApiUploadTest::testUploadStash
Failed asserting that <boolean:true> is false.

/var/www/thedarkcitadel.com/w/tests/phpunit/includes/api/ApiUploadTest.php:398
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
/var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


overlordq at gmail

Jun 16, 2011, 4:08 PM

Post #9 of 14 (1049 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

> 1) BlockTest::testInitializerFunctionsReturnCorrectBlock
> Argument 1 passed to Block::equals() must be an instance of Block,
> null given, called in
> /var/www/thedarkcitadel.com/w/tests/phpunit/includes/BlockTest.php on
> line 72 and defined
>
> /var/www/thedarkcitadel.com/w/includes/Block.php:133
> /var/www/thedarkcitadel.com/w/tests/phpunit/includes/BlockTest.php:72
> /var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
> /var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
> /var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60

> 4) ApiUploadTest::testUploadStash
> Failed asserting that <boolean:true> is false.
>
> /var/www/thedarkcitadel.com/w/tests/phpunit/includes/api/ApiUploadTest.php:398
> /var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiTestCase.php:61
> /var/www/thedarkcitadel.com/w/tests/phpunit/MediaWikiPHPUnitCommand.php:20
> /var/www/thedarkcitadel.com/w/tests/phpunit/phpunit.php:60
>


After clearing out the images directory, everything passes except the
BlockTest::testInitializerFunctionsReturnCorrectBlock and
ApiUploadTest::testUploadStash.

If I dump out the exception that's being thrown, the message is: Not a
valid session key

May be some lingering wonkyness with the site since I did cannibalize
an existing site instead of putting up a fresh deploy since I figured
it would kill anything it needed to.

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


maxsem.wiki at gmail

Jun 16, 2011, 6:35 PM

Post #10 of 14 (1046 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On 17.06.2011, 1:08 Bryan wrote:

> Can somebody on Windows/SQLite try running the tests? I'm consistently
> getting two failures in XmlTest, which Chad apparently is not getting:


Yes, same thing for me. Hoowever. the difs show no real difference,
WTF? PHP 5.3.5/XAMPP - these errors aren't related to database.

--
Best regards,
Max Semenik ([[User:MaxSem]])


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


bryan.tongminh at gmail

Jun 18, 2011, 10:32 AM

Post #11 of 14 (1047 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Fri, Jun 17, 2011 at 3:35 AM, Max Semenik <maxsem.wiki [at] gmail> wrote:
> On 17.06.2011, 1:08 Bryan wrote:
>
>> Can somebody on Windows/SQLite try running the tests? I'm consistently
>> getting two failures in XmlTest, which Chad apparently is not getting:
>
>
> Yes, same thing for me. Hoowever. the difs show no real difference,
> WTF? PHP 5.3.5/XAMPP - these errors aren't related to database.
>
Yeah, pretty WTF, especially since it is the "expected" that is broken...
Anybody has an idea?


Bryan

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


bryan.tongminh at gmail

Jun 18, 2011, 10:36 AM

Post #12 of 14 (1052 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Wed, Jun 15, 2011 at 11:02 PM, Chad <innocentkiller [at] gmail> wrote:
> Painstakingly, all of the unit tests are now passing on cruise control (Sqlite)
> and my local install (Sqlite & Mysql). This is as of r90150 [0]. Thank you
> immensely to Brion for finally tracking down and eliminating that pesky
> BlockTest bug.
>

How often does CC run the tests? Can we make it run after every commit?


Bryan

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


hashar+wmf at free

Jun 30, 2011, 11:38 PM

Post #13 of 14 (973 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On 18/06/11 19:36, Bryan Tong Minh wrote:
> How often does CC run the tests?

It is once per hour, one can trigger a build manually.


> Can we make it run after every commit?

Not out of the box :-/ There is two possibilities though:

- change CC 'svn update' script so it fetches only one revision.
- add a SVN post commit hook to trigger a build (either through CC web
service or by touching the CC/projects/mw/touchme directory.


--
Ashar Voultoiz


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


innocentkiller at gmail

Jul 1, 2011, 4:44 AM

Post #14 of 14 (969 views)
Permalink
Re: Unit testing now working - break it and be reverted [In reply to]

On Fri, Jul 1, 2011 at 2:38 AM, Ashar Voultoiz <hashar+wmf [at] free> wrote:
>  - add a SVN post commit hook to trigger a build (either through CC web
> service or by touching the  CC/projects/mw/touchme directory.
>

This is on my todo list, as is fixing up our commit hooks in general.

-Chad

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.