Re: [Wikitech-l] PHPUnit tests fail from Jenkins but work fine locally

2013-06-29 Thread Antoine Musso
Le 29/06/13 02:59, Roan Kattouw a écrit :
 * Attempt to merge the branch into master
 * If there is a conflict, reject the commit with a message saying
 something about a merge conflict, and abort
 * If there was no conflict, there is now a local (to the Jenkins
 server) merge commit that merges this branch into master
 * Run tests on this merge commit

That is exactly how Zuul handles it.

While rebasing the change https://gerrit.wikimedia.org/r/#/c/69585/
(PS3) I noticed the unit tests were not being run.  I fixed the
configuration of that extension in Zuul and resent a new patchset.

Test is still failing though :-]

-- 
Antoine hashar Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] PHPUnit tests fail from Jenkins but work fine locally

2013-06-28 Thread Arthur Richards
Mobile web is trying to merge https://gerrit.wikimedia.org/r/#/c/69585/ but
PHPUnit tests are failing when Jenkins executes them.

What's weird is that we've executed PHPUnit tests on our various local
machines - with no failures. We've been scratching our heads trying to
figure out what might be causing the inconsistency.

Anyone have any ideas what might be causing this?

-- 
Arthur Richards
Software Engineer, Mobile
[[User:Awjrichards]]
IRC: awjr
+1-415-839-6885 x6687
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHPUnit tests fail from Jenkins but work fine locally

2013-06-28 Thread Yuri Astrakhan
I once had similar issue due to the difference in how Jenkins (uses sqlite)
differs from mariadb setup.That issue is still pending, and needs fixing in
the way we set up sqlite database schema --
https://gerrit.wikimedia.org/r/#/c/48098/

Other than that, I only saw issues related to some leftover state from
previous tests. Running test independently passes, but running them all
together fails.

On Fri, Jun 28, 2013 at 1:50 PM, Arthur Richards aricha...@wikimedia.orgwrote:

 Mobile web is trying to merge https://gerrit.wikimedia.org/r/#/c/69585/but
 PHPUnit tests are failing when Jenkins executes them.

 What's weird is that we've executed PHPUnit tests on our various local
 machines - with no failures. We've been scratching our heads trying to
 figure out what might be causing the inconsistency.

 Anyone have any ideas what might be causing this?

 --
 Arthur Richards
 Software Engineer, Mobile
 [[User:Awjrichards]]
 IRC: awjr
 +1-415-839-6885 x6687
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHPUnit tests fail from Jenkins but work fine locally

2013-06-28 Thread Ryan Kaldari
We had the same problem with Echo. One thing to look out for is that 
SQLite requires unique index names across the full database. Also SQLite 
doesn't support ALTER TABLE CHANGE, so you may have to detect for SQLite 
and do some rename/copy/delete operation instead.


Ryan Kaldari

On 6/28/13 10:50 AM, Arthur Richards wrote:

Mobile web is trying to merge https://gerrit.wikimedia.org/r/#/c/69585/ but
PHPUnit tests are failing when Jenkins executes them.

What's weird is that we've executed PHPUnit tests on our various local
machines - with no failures. We've been scratching our heads trying to
figure out what might be causing the inconsistency.

Anyone have any ideas what might be causing this?



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHPUnit tests fail from Jenkins but work fine locally

2013-06-28 Thread Antoine Musso
Le 28/06/13 19:50, Arthur Richards a écrit :
 Mobile web is trying to merge https://gerrit.wikimedia.org/r/#/c/69585/ but
 PHPUnit tests are failing when Jenkins executes them.
 
 What's weird is that we've executed PHPUnit tests on our various local
 machines - with no failures. We've been scratching our heads trying to
 figure out what might be causing the inconsistency.
 
 Anyone have any ideas what might be causing this?

MaxSem mentioned that failing test earlier this week. The snippet is:


MF_ExtractFormatterTest::testExtracts()

-'Dutch ( Nederlands ) is a West Germanic ...
+'Dutch (About this sound Nederlands ) is a West Germanic ...


The content passed to the function has:

 span class=unicode haudio style=white-space:nowrap;span class=fn

I guess the function is supposed to expand the HTML to 'About this
sound'.   There must be something wrong in the change code so.


-- 
Antoine hashar Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] PHPUnit tests fail from Jenkins but work fine locally

2013-06-28 Thread Roan Kattouw
On Fri, Jun 28, 2013 at 10:50 AM, Arthur Richards
aricha...@wikimedia.org wrote:
 Mobile web is trying to merge https://gerrit.wikimedia.org/r/#/c/69585/ but
 PHPUnit tests are failing when Jenkins executes them.

 What's weird is that we've executed PHPUnit tests on our various local
 machines - with no failures. We've been scratching our heads trying to
 figure out what might be causing the inconsistency.

 Anyone have any ideas what might be causing this?

Something that's tripped me up with VisualEditor a couple of times is
that Jenkins doesn't actually run the tests on your branch, it runs
them on a hypothetical merge with your branch into master. The process
is something like this:
* Attempt to merge the branch into master
* If there is a conflict, reject the commit with a message saying
something about a merge conflict, and abort
* If there was no conflict, there is now a local (to the Jenkins
server) merge commit that merges this branch into master
* Run tests on this merge commit

This means that if there was a recent change in master that broke your
code, but doesn't conflict directly (perhaps because an interface you
were using changed), the tests succeed in the branch but fail in the
merge commit. Jenkins correctly recognizes that merging your branch
would break master, and rejects your branch reporting the relevant
test failures, but this is not immediately obvious because the code as
committed worked fine.

The way I address this is to rebase the change onto master (and
because there is no conflict, you can even use Gerrit's rebase button
for this), at which point the tests will start failing locally as
well.

Roan

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l