You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2013/08/26 09:02:01 UTC

Tapestry Tests Wack-A-Mole

Been playing wack-a-mole with some of the Tapestry tests ... but it appears
its just a matter of adding enough waitForPageInitialized() calls.  Mostly.

-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Tapestry Tests Wack-A-Mole

Posted by Massimo Lusetti <ml...@gmail.com>.
On Mon, Aug 26, 2013 at 10:26 AM, Dimitris Zenios <dimitris.zenios@gmail.com
> wrote:

I already posted on a previous thread regarding the CI failure on issute
>  TAP5-1007 but most probably nobody saw it. Re posting again here
>
> This is a legitimate bug.
>
> If your filesystem is case sensitive like most linux os are
> then classLoader.getResource will return null.After that when calling
> validateUrl with a null parameter it returns instead of throwing the
> expected exception (IllegalStateException) of the test case.
>
> Most probably if the load resource method returns null it should throw an
> exception right away.It doesn't need to pass to validateUrl.
>
> P.S:Its very weird that in masimos box all tests are running fine.Most
> probably he is using a case insensitive filesystem (vfat?).In my box the
> test fails like CI
>
>
I'm overbooked at the moment (it's my welcome back from holidays).
I've had time to only check it lightly but it seems the validateURL check
in AbstractResource is constantly failing cause is legitimate to pass URL
as null (read when a search for localized template is done).

The result is that the check never occurs so a RuntimeException occurs as
before, thus the test fails:

java.lang.RuntimeException
Page About did not generate any markup when rendered. This could be because
its template file could not be located, or because a render phase method in
the page prevented rendering.


I'm going to look at it asap.

-- 
Massimo Lusetti

Re: Tapestry Tests Wack-A-Mole

Posted by Massimo Lusetti <ml...@gmail.com>.
Yes, Dimitris you are talking about a different bug (which seems valid)
than Howard. I'm going to look at it later, today.


On Mon, Aug 26, 2013 at 12:27 PM, Howard Lewis Ship <hl...@gmail.com>wrote:

> What I'm working on, and will commit tonight, is that pages always emit a
> data-page-initialized tag on the <body> element; this is either initally
> "true" if the page has no JavaScript initialization, or is set to "true"
> once page initialization is complete.  The latter part of that has been
> around for a while.
>
> In any case, this means that I can change the Selenium waitForPageToLoad()
> to wait for the data-page-initialized attribute to go to "true".  This will
> vastly improve the stability of all the tests, which often fail when they
> outrace the page initialization.
>
> I may have a few minutes to work on it tonight once I get back from the my
> client (I'm in Ireland at Aviso today).
>
>
>
> On Mon, Aug 26, 2013 at 1:26 AM, Dimitris Zenios
> <di...@gmail.com>wrote:
>
> > I already posted on a previous thread regarding the CI failure on issute
> >  TAP5-1007 but most probably nobody saw it. Re posting again here
> >
> > This is a legitimate bug.
> >
> > If your filesystem is case sensitive like most linux os are
> > then classLoader.getResource will return null.After that when calling
> > validateUrl with a null parameter it returns instead of throwing the
> > expected exception (IllegalStateException) of the test case.
> >
> > Most probably if the load resource method returns null it should throw an
> > exception right away.It doesn't need to pass to validateUrl.
> >
> > P.S:Its very weird that in masimos box all tests are running fine.Most
> > probably he is using a case insensitive filesystem (vfat?).In my box the
> > test fails like CI
> >
> > Below are details of my pc and filesystem.
> > Linux localhost.localdomain 3.10.6-200.fc19.x86_64 #1 SMP Mon Aug 12
> > 14:49:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> > /dev/mapper/fedora-home on /home type ext4
> > (rw,relatime,seclabel,data=ordered)
> >
> >
> > On Mon, Aug 26, 2013 at 11:18 AM, Massimo Lusetti <mlusetti@gmail.com
> > >wrote:
> >
> > > Yep.
> > > That was my feeling too but that kind of solutions are lurching,
> usually.
> > >
> > >
> > > On Mon, Aug 26, 2013 at 9:02 AM, Howard Lewis Ship <hl...@gmail.com>
> > > wrote:
> > >
> > > > Been playing wack-a-mole with some of the Tapestry tests ... but it
> > > appears
> > > > its just a matter of adding enough waitForPageInitialized() calls.
> > >  Mostly.
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > >
> > > > Creator of Apache Tapestry
> > > >
> > > > The source for Tapestry training, mentoring and support. Contact me
> to
> > > > learn how I can get you up and productive in Tapestry fast!
> > > >
> > > > (971) 678-5210
> > > > http://howardlewisship.com
> > > >
> > >
> > >
> > >
> > > --
> > > Massimo Lusetti
> > >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>



-- 
Massimo Lusetti

Re: Tapestry Tests Wack-A-Mole

Posted by Howard Lewis Ship <hl...@gmail.com>.
What I'm working on, and will commit tonight, is that pages always emit a
data-page-initialized tag on the <body> element; this is either initally
"true" if the page has no JavaScript initialization, or is set to "true"
once page initialization is complete.  The latter part of that has been
around for a while.

In any case, this means that I can change the Selenium waitForPageToLoad()
to wait for the data-page-initialized attribute to go to "true".  This will
vastly improve the stability of all the tests, which often fail when they
outrace the page initialization.

I may have a few minutes to work on it tonight once I get back from the my
client (I'm in Ireland at Aviso today).



On Mon, Aug 26, 2013 at 1:26 AM, Dimitris Zenios
<di...@gmail.com>wrote:

> I already posted on a previous thread regarding the CI failure on issute
>  TAP5-1007 but most probably nobody saw it. Re posting again here
>
> This is a legitimate bug.
>
> If your filesystem is case sensitive like most linux os are
> then classLoader.getResource will return null.After that when calling
> validateUrl with a null parameter it returns instead of throwing the
> expected exception (IllegalStateException) of the test case.
>
> Most probably if the load resource method returns null it should throw an
> exception right away.It doesn't need to pass to validateUrl.
>
> P.S:Its very weird that in masimos box all tests are running fine.Most
> probably he is using a case insensitive filesystem (vfat?).In my box the
> test fails like CI
>
> Below are details of my pc and filesystem.
> Linux localhost.localdomain 3.10.6-200.fc19.x86_64 #1 SMP Mon Aug 12
> 14:49:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> /dev/mapper/fedora-home on /home type ext4
> (rw,relatime,seclabel,data=ordered)
>
>
> On Mon, Aug 26, 2013 at 11:18 AM, Massimo Lusetti <mlusetti@gmail.com
> >wrote:
>
> > Yep.
> > That was my feeling too but that kind of solutions are lurching, usually.
> >
> >
> > On Mon, Aug 26, 2013 at 9:02 AM, Howard Lewis Ship <hl...@gmail.com>
> > wrote:
> >
> > > Been playing wack-a-mole with some of the Tapestry tests ... but it
> > appears
> > > its just a matter of adding enough waitForPageInitialized() calls.
> >  Mostly.
> > >
> > > --
> > > Howard M. Lewis Ship
> > >
> > > Creator of Apache Tapestry
> > >
> > > The source for Tapestry training, mentoring and support. Contact me to
> > > learn how I can get you up and productive in Tapestry fast!
> > >
> > > (971) 678-5210
> > > http://howardlewisship.com
> > >
> >
> >
> >
> > --
> > Massimo Lusetti
> >
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Tapestry Tests Wack-A-Mole

Posted by Dimitris Zenios <di...@gmail.com>.
I already posted on a previous thread regarding the CI failure on issute
 TAP5-1007 but most probably nobody saw it. Re posting again here

This is a legitimate bug.

If your filesystem is case sensitive like most linux os are
then classLoader.getResource will return null.After that when calling
validateUrl with a null parameter it returns instead of throwing the
expected exception (IllegalStateException) of the test case.

Most probably if the load resource method returns null it should throw an
exception right away.It doesn't need to pass to validateUrl.

P.S:Its very weird that in masimos box all tests are running fine.Most
probably he is using a case insensitive filesystem (vfat?).In my box the
test fails like CI

Below are details of my pc and filesystem.
Linux localhost.localdomain 3.10.6-200.fc19.x86_64 #1 SMP Mon Aug 12
14:49:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
/dev/mapper/fedora-home on /home type ext4
(rw,relatime,seclabel,data=ordered)


On Mon, Aug 26, 2013 at 11:18 AM, Massimo Lusetti <ml...@gmail.com>wrote:

> Yep.
> That was my feeling too but that kind of solutions are lurching, usually.
>
>
> On Mon, Aug 26, 2013 at 9:02 AM, Howard Lewis Ship <hl...@gmail.com>
> wrote:
>
> > Been playing wack-a-mole with some of the Tapestry tests ... but it
> appears
> > its just a matter of adding enough waitForPageInitialized() calls.
>  Mostly.
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator of Apache Tapestry
> >
> > The source for Tapestry training, mentoring and support. Contact me to
> > learn how I can get you up and productive in Tapestry fast!
> >
> > (971) 678-5210
> > http://howardlewisship.com
> >
>
>
>
> --
> Massimo Lusetti
>

Re: Tapestry Tests Wack-A-Mole

Posted by Massimo Lusetti <ml...@gmail.com>.
Yep.
That was my feeling too but that kind of solutions are lurching, usually.


On Mon, Aug 26, 2013 at 9:02 AM, Howard Lewis Ship <hl...@gmail.com> wrote:

> Been playing wack-a-mole with some of the Tapestry tests ... but it appears
> its just a matter of adding enough waitForPageInitialized() calls.  Mostly.
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>



-- 
Massimo Lusetti