You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@googlemail.com> on 2009/08/25 20:49:39 UTC

How to build dojo plugin???

Hi,

I'm desperate ;-( I'm trying to build and install struts2-dojo-plugin
from source but each time I'm getting errors in test. I've tried with
different locales but no luck: mvn install -Duser.country=US
-Duser.language=en

What to do? Please help!


testSimple(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
 Time elapsed: 0.141 sec  <<< FAILURE!
junit.framework.ComparisonFailure:
expected:<...id"value="2008-03-03["lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02"endDate="2008-01-01]"weekStartsOn="g"sta...>
but was:<...id"value="2008-03-03[T00:00:00"lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02T00:00:00"endDate="2008-01-01T00:00:00]"weekStartsOn="g"sta...>

testSimpleDisabled(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
 Time elapsed: 0.109 sec  <<< FAILURE!
junit.framework.ComparisonFailure:
expected:<...id"value="2008-03-03["lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02"endDate="2008-01-01]"weekStartsOn="g"sta...>
but was:<...id"value="2008-03-03[T00:00:00"lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02T00:00:00"endDate="2008-01-01T00:00:00]"weekStartsOn="g"sta...>

testDateParsing(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
 Time elapsed: 0.079 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2007> but was:<6>



Thanks in advance
-- 
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: How to build dojo plugin???

Posted by Robert <rl...@apache.org>.
I see this type of behavior when there is a dependency, side effect, 
between tests.
An example of this is STATIC variables and I have seen this same type of 
effect many times when running JUnits with IntelliJ v.s maven
IntelliJ reinstates the JUnit Runner class for each test method, and 
therefore starts with a clean slate for static variables.
I believe starting with IJ 4.5, to implement the rerun failed test, IJ 
changed the behavior to differ from just using maven.
I find this difference in running JUnits valuable since they find latent 
bugs in the JUnit tests, but they can have funny consequences:

<Funny story>
I had a case where a co-worker kept breaking the JUnits because he was 
using eclipse and was FIXING the expected results of the tests to pass 
when run under eclipse.
However, doing this would break the tests running under IntelliJ, I 
would FIX the tests running under IntelliJ, which would break the tests 
running under eclipse.
This continued for several weeks, and we both kept FIXING the tests. 
Finally I realized what was going on and fixed the static initialization 
problem and the problem
went away.
<Funny Story>

Hope this helps

-Rob


On 8/26/2009 10:30 AM, Lukasz Lenart wrote:
> Hi,
>
> I discovered another strange thing. When I just launch the test from
> IDEA with -Duser.country=US -Duser.language=en, then it pass. But when
> I use maven with the same settings, only two test fail :P
>
> testSimple(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
> testSimpleDisabled(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
>
> I've tried to use the latest maven version, JDK5 and JDK6, but no
> lock. Any ideas?
>
>
> Regards
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: How to build dojo plugin???

Posted by Musachy Barroso <mu...@gmail.com>.
I feel a disturbance in the force ;)

musachy

On Wed, Aug 26, 2009 at 7:30 AM, Lukasz
Lenart<lu...@googlemail.com> wrote:
> Hi,
>
> I discovered another strange thing. When I just launch the test from
> IDEA with -Duser.country=US -Duser.language=en, then it pass. But when
> I use maven with the same settings, only two test fail :P
>
> testSimple(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
> testSimpleDisabled(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
>
> I've tried to use the latest maven version, JDK5 and JDK6, but no
> lock. Any ideas?
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
> http://dailylog.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: How to build dojo plugin???

Posted by Lukasz Lenart <lu...@googlemail.com>.
Hi,

I discovered another strange thing. When I just launch the test from
IDEA with -Duser.country=US -Duser.language=en, then it pass. But when
I use maven with the same settings, only two test fail :P

testSimple(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
testSimpleDisabled(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)

I've tried to use the latest maven version, JDK5 and JDK6, but no
lock. Any ideas?


Regards
-- 
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: How to build dojo plugin???

Posted by Wes Wannemacher <we...@wantii.com>.
On Tuesday 25 August 2009 02:59:47 pm Lukasz Lenart wrote:
> 2009/8/25 Musachy Barroso <mu...@gmail.com>:
> > something changed in the way the dates are formatted I guess.
> >
> > 2008-03-03 vs 2008-03-03T00:00:00
>
> Yeah, I noticed that but I've been thinking it's related to Locale but
> I've tried different combinations.
>
> > I thought it was using the second one already. Maybe you just need to
> > update the tests.
>
> I did that and I'm up-to-date, but still the same. Any other ideas?
>


I'm pretty sure that both of the dates listed above are in the iso8601 format, 
or whatever the iso format is. It is the format that JSON uses to serialize 
dates. The standard for the format allows you to only specify the parts that 
are significant, so 2008-03-03 is as legit as 2008-03-03T00:00:00. But the 
problem is that there is no built-in support in either java or javascript, so 
using it is often a PITA.

-Wes


-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat... 
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: How to build dojo plugin???

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/8/25 Musachy Barroso <mu...@gmail.com>:
> something changed in the way the dates are formatted I guess.
>
> 2008-03-03 vs 2008-03-03T00:00:00

Yeah, I noticed that but I've been thinking it's related to Locale but
I've tried different combinations.

> I thought it was using the second one already. Maybe you just need to
> update the tests.

I did that and I'm up-to-date, but still the same. Any other ideas?



Regards
-- 
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: How to build dojo plugin???

Posted by Musachy Barroso <mu...@gmail.com>.
something changed in the way the dates are formatted I guess.

2008-03-03 vs 2008-03-03T00:00:00

I thought it was using the second one already. Maybe you just need to
update the tests.

On Tue, Aug 25, 2009 at 11:49 AM, Lukasz
Lenart<lu...@googlemail.com> wrote:
> Hi,
>
> I'm desperate ;-( I'm trying to build and install struts2-dojo-plugin
> from source but each time I'm getting errors in test. I've tried with
> different locales but no luck: mvn install -Duser.country=US
> -Duser.language=en
>
> What to do? Please help!
>
>
> testSimple(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
>  Time elapsed: 0.141 sec  <<< FAILURE!
> junit.framework.ComparisonFailure:
> expected:<...id"value="2008-03-03["lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02"endDate="2008-01-01]"weekStartsOn="g"sta...>
> but was:<...id"value="2008-03-03[T00:00:00"lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02T00:00:00"endDate="2008-01-01T00:00:00]"weekStartsOn="g"sta...>
>
> testSimpleDisabled(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
>  Time elapsed: 0.109 sec  <<< FAILURE!
> junit.framework.ComparisonFailure:
> expected:<...id"value="2008-03-03["lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02"endDate="2008-01-01]"weekStartsOn="g"sta...>
> but was:<...id"value="2008-03-03[T00:00:00"lang="i"name="h"inputName="dojo.h"displayWeeks="true"adjustWeeks="true"startDate="2008-02-02T00:00:00"endDate="2008-01-01T00:00:00]"weekStartsOn="g"sta...>
>
> testDateParsing(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
>  Time elapsed: 0.079 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: expected:<2007> but was:<6>
>
>
>
> Thanks in advance
> --
> Lukasz
> http://www.lenart.org.pl/
> http://dailylog.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org