You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rya.apache.org by Amila Wijayarathna <am...@gmail.com> on 2016/02/29 19:16:26 UTC

Test 'testMilliSecondsNoZone' Fails when Building from Source

Hi all,

I am trying to build Apache Rya source available at [1]. I could
successfully built the source by running without tests using "mvn clean
install -Dmaven.test.skip=true". But when I am running the source with
tests using "mvn clean install", I am getting test failure at [2].

It seems like in the test 'testMilliSecondsNoZone', it pass
'2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it returns
'2002-02-01T02:02:02.222' after deserialising and it causes the test to
fail.

Is this a know issue or am I getting this due to some incompatibility in my
environment?

Any idea on this is thoroughly appreciated.

[1]. https://github.com/apache/incubator-rya
[2].
testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest)
 Time elapsed: 0.051 sec  <<< FAILURE!
java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected should
match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
deserialized:2002-02-01T20:02:02.222Z
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at
mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSecondsNoZone(DateTimeRyaTypeResolverTest.java:116)

Thank You!

*Amila Wijayarathna,*
undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by Josh Elser <jo...@gmail.com>.
Amila -- Please make sure you subscribe to the mailing list so that you 
receive all correspondences.

Send a message to dev-subscribe@rya.incubator.apache.org and follow the 
instructions you receive in the reply.

Thanks.

Amila Wijayarathna wrote:
> Hi all,
>
> I am trying to build Apache Rya source available at [1]. I could
> successfully built the source by running without tests using "mvn clean
> install -Dmaven.test.skip=true". But when I am running the source with
> tests using "mvn clean install", I am getting test failure at [2].
>
> It seems like in the test 'testMilliSecondsNoZone', it pass
> '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it returns
> '2002-02-01T02:02:02.222' after deserialising and it causes the test to
> fail.
>
> Is this a know issue or am I getting this due to some incompatibility in my
> environment?
>
> Any idea on this is thoroughly appreciated.
>
> [1]. https://github.com/apache/incubator-rya
> [2].
> testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest)
>   Time elapsed: 0.051 sec<<<  FAILURE!
> java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected should
> match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> deserialized:2002-02-01T20:02:02.222Z
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at
> mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSecondsNoZone(DateTimeRyaTypeResolverTest.java:116)
>
> Thank You!
>
> *Amila Wijayarathna,*
> undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>

RE: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by "Lotts, David" <Da...@parsons.com>.
I don't think that is a known bug.  It looks very similar to issue RYA-6. https://issues.apache.org/jira/browse/RYA-6
I would not think it is a fatal problem with your environment, more likely an unanticipated corner case.  I think this test was formulated to find those.

May I ask what your computer's time zone?
Use a command like this:

    Unix$ date -u

    Windows cmd> tzutil /g

and your operating system and  java version?

david.



-----Original Message-----
From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com] 
Sent: Monday, February 29, 2016 2:07 PM
To: dev@rya.incubator.apache.org
Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

 Hi all,
I am getting the same issue in 'develop' branch as well .

Thank you!


*Amila Wijayarathna,*
undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna < amwijayarathna@gmail.com> wrote:

> Hi all,
>
> I am trying to build Apache Rya source available at [1]. I could 
> successfully built the source by running without tests using "mvn 
> clean install -Dmaven.test.skip=true". But when I am running the 
> source with tests using "mvn clean install", I am getting test failure at [2].
>
> It seems like in the test 'testMilliSecondsNoZone', it pass 
> '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it 
> returns '2002-02-01T02:02:02.222' after deserialising and it causes 
> the test to fail.
>
> Is this a know issue or am I getting this due to some incompatibility 
> in my environment?
>
> Any idea on this is thoroughly appreciated.
>
> [1]. 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> _incubator-2Drya&d=BQIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq1
> 0&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=YMkoBqgmlbmrxhOslxCh
> aXpbBMpeTAkCqRWkaibToLM&s=hhM4nAeG7KurtBlNQNclAbVzZev4f-d2dx-Xlm6LHsI&
> e=
> [2].
> testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolv
> erTest)  Time elapsed: 0.051 sec  <<< FAILURE!
> java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected 
> should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> deserialized:2002-02-01T20:02:02.222Z
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at
> mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSeconds
> NoZone(DateTimeRyaTypeResolverTest.java:116)
>
> Thank You!
>
> *Amila Wijayarathna,*
> undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by Amila Wijayarathna <am...@gmail.com>.
Correction,
Since the PR for fixing https://issues.apache.org/jira/browse/RYA-44 has
been merged, shall we mark this jira as resolved?

Thank you!

On Sat, Mar 12, 2016 at 1:45 AM, Amila Wijayarathna <
amwijayarathna@gmail.com> wrote:

> Hi all,
> Since the PR for fixing https://issues.apache.org/jira/browse/RYA-48 has
> been merged, shall we mark this jira as resolved?
>
> On Wed, Mar 2, 2016 at 11:48 PM, Lotts, David <Da...@parsons.com>
> wrote:
>
>> Amila,
>>
>> Here is a guide to contributing to Rya:
>> https://cwiki.apache.org/confluence/display/RYA/Contributing+to+Rya
>>
>> > I created fix for the issue as David advised in
>> I'm not a committer, but I'll review your patch.
>> david.
>>
>
>
>
> --
>
> *Amila Wijayarathna*
> Undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>



-- 

*Amila Wijayarathna*
Undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by Amila Wijayarathna <am...@gmail.com>.
Hi all,
Since the PR for fixing https://issues.apache.org/jira/browse/RYA-48 has
been merged, shall we mark this jira as resolved?

On Wed, Mar 2, 2016 at 11:48 PM, Lotts, David <Da...@parsons.com>
wrote:

> Amila,
>
> Here is a guide to contributing to Rya:
> https://cwiki.apache.org/confluence/display/RYA/Contributing+to+Rya
>
> > I created fix for the issue as David advised in
> I'm not a committer, but I'll review your patch.
> david.
>



-- 

*Amila Wijayarathna*
Undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

RE: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by "Lotts, David" <Da...@parsons.com>.
Amila,

Here is a guide to contributing to Rya:
https://cwiki.apache.org/confluence/display/RYA/Contributing+to+Rya

> I created fix for the issue as David advised in
I'm not a committer, but I'll review your patch.
david.

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by Amila Wijayarathna <am...@gmail.com>.
Hi all,

I created fix for the issue as David advised in
https://github.com/apache/incubator-rya/pull/23. Please review and merge.

Please excuse me if I haven't followed the coding standards and commit/PR
naming standards you follow when contributing. I couldn't found any guide
on how to contribute and standards to follow. Please point me if there is
any such source avaible.

Thank You!

On Wed, Mar 2, 2016 at 12:49 AM, Lotts, David <Da...@parsons.com>
wrote:

> Amila,
> I think I see what you are suggesting.
> If we use a before date with a noon hour, then the day will not be changed
> for any timezone offset in the range: +1130 to -1130.  This is a great
> practical  simplification!
>
> However, the time zone offset can be -12:00 to +14:00.  For example, New
> Zealand summer time is +13:00.  Some standards go larger for future
> extensions: +-18:00.
> ( https://docs.oracle.com/javase/8/docs/api/java/time/ZoneOffset.html )
>
> The purpose of the test is to make sure the timezone conversion during
> serialization and deserialization "roughly" gives the same date and time
> and preserves the seconds and milliseconds exactly.
>
> david.
>
> -----Original Message-----
> From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com]
> Sent: Tuesday, March 01, 2016 12:44 PM
> To: dev@rya.incubator.apache.org
> Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from Source
>
> Hi David,
>
> You are right, I'm from Sri Lanka (Time zone - +0530). But when I run
> "date -u" I am getting following.
>
> "2016 මාර්තු  1 වැනි අඟහරුවාදා 17:09:26 +0000"
>
> By setting up
>
> String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";
>
> I could successfully run the test and it got passed. But I believe this is
> not a perfect fix since by accident if we get '2002-02-02T02:02:02.222'
> when expected output is '2002-02-01T02:02:02.222', the test will still
> pass. So if this occurs due to a issue in functionality automation tests
> will miss it.
>
> I tried
>
> String beforeDate="2002-02-02T02:12:02.222";
>
> and here also test passed successfully. Even though I'm not sure what is
> expected to test in this test case, this sounds a better solution to me. If
> funnctionality works fine, output for this will match the defined regex in
> +1130 to -1130 time zones. What do you think? What would be the better fix?
>
> I created a jira for this [1]. Once we finalized on the fix, I'll send a
> pull request to git 'develop' branch. Also is it possible to assign the
> created jira for me?
>
> [1].
> https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_RYA-2D44&d=BQIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=gGs-q5mWFLzFQT__sUMtnP5LZkgG2FYXGQnChlrEC1Q&s=yXAhcDuGZRRBSQyZH1O5-tw-Dr6_8B-awdFIP8po2uo&e=
>
> Thank You!
>
> Amila Wijayarathna
>
> On Tue, Mar 1, 2016 at 2:30 AM, Lotts, David <Da...@parsons.com>
> wrote:
>
> > Amila,
> > I think I see the cause of the failed test.  I'm going to predict that
> > your timezone is greater than +02:00.   ( I am a psychic :-) ).
> >
> > The test above yours: testNoZone()
> > is similar, except that it specifies milliseconds and uses this regex:
> > String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";
> >
> > It accounts for the fact that the local timezone might change the day.
> > So the fix is probably to add the same fuzzy day: "(1|2|3)" to the
> > test that is failing:  testMilliSecondsNoZone().
> >
> > Feel free to create a Jira issue and fix it and be a hero!
> > Or just add a @Ignore above the @test and keep working and STILL be a
> > hero for find this test bug!
> >
> > david.
> >
> > -----Original Message-----
> > From: Lotts, David
> > Sent: Monday, February 29, 2016 3:09 PM
> > To: dev@rya.incubator.apache.org
> > Subject: RE: Test 'testMilliSecondsNoZone' Fails when Building from
> > Source
> >
> > I don't think that is a known bug.  It looks very similar to issue RYA-6.
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org
> > _jira_browse_RYA-2D6&d=BQIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdf
> > xIq10&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=gGs-q5mWFLzFQT__
> > sUMtnP5LZkgG2FYXGQnChlrEC1Q&s=63s28I-cmbpkqTb_06ldxBqPHhFng2WED6F8Tu8z
> > t54&e= I would not think it is a fatal problem with your environment,
> > more likely an unanticipated corner case.  I think this test was
> > formulated to find those.
> >
> > May I ask what your computer's time zone?
> > Use a command like this:
> >
> >     Unix$ date -u
> >
> >     Windows cmd> tzutil /g
> >
> > and your operating system and  java version?
> >
> > david.
> >
> >
> >
> > -----Original Message-----
> > From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com]
> > Sent: Monday, February 29, 2016 2:07 PM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from
> > Source
> >
> >  Hi all,
> > I am getting the same issue in 'develop' branch as well .
> >
> > Thank you!
> >
> >
> > *Amila Wijayarathna,*
> > undergraduate,
> > Faculty of Information Technology,
> > University of Moratuwa,
> > Sri Lanka.
> >
> > On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna <
> > amwijayarathna@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > I am trying to build Apache Rya source available at [1]. I could
> > > successfully built the source by running without tests using "mvn
> > > clean install -Dmaven.test.skip=true". But when I am running the
> > > source with tests using "mvn clean install", I am getting test
> > > failure
> > at [2].
> > >
> > > It seems like in the test 'testMilliSecondsNoZone', it pass
> > > '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it
> > > returns '2002-02-01T02:02:02.222' after deserialising and it causes
> > > the test to fail.
> > >
> > > Is this a know issue or am I getting this due to some
> > > incompatibility in my environment?
> > >
> > > Any idea on this is thoroughly appreciated.
> > >
> > > [1].
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apac
> > > he
> > > _incubator-2Drya&d=BQIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxI
> > > q1
> > > 0&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=YMkoBqgmlbmrxhOslx
> > > Ch
> > > aXpbBMpeTAkCqRWkaibToLM&s=hhM4nAeG7KurtBlNQNclAbVzZev4f-d2dx-Xlm6LHs
> > > I&
> > > e=
> > > [2].
> > > testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeReso
> > > lv
> > > erTest)  Time elapsed: 0.051 sec  <<< FAILURE!
> > > java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected
> > > should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> > > deserialized:2002-02-01T20:02:02.222Z
> > > at org.junit.Assert.fail(Assert.java:88)
> > > at org.junit.Assert.assertTrue(Assert.java:41)
> > > at
> > > mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSecon
> > > ds
> > > NoZone(DateTimeRyaTypeResolverTest.java:116)
> > >
> > > Thank You!
> > >
> > > *Amila Wijayarathna,*
> > > undergraduate,
> > > Faculty of Information Technology,
> > > University of Moratuwa,
> > > Sri Lanka.
> > >
> >
>

RE: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by "Lotts, David" <Da...@parsons.com>.
Amila,
I think I see what you are suggesting.  
If we use a before date with a noon hour, then the day will not be changed for any timezone offset in the range: +1130 to -1130.  This is a great practical  simplification!

However, the time zone offset can be -12:00 to +14:00.  For example, New Zealand summer time is +13:00.  Some standards go larger for future extensions: +-18:00.
( https://docs.oracle.com/javase/8/docs/api/java/time/ZoneOffset.html )

The purpose of the test is to make sure the timezone conversion during serialization and deserialization "roughly" gives the same date and time and preserves the seconds and milliseconds exactly.

david.

-----Original Message-----
From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com] 
Sent: Tuesday, March 01, 2016 12:44 PM
To: dev@rya.incubator.apache.org
Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Hi David,

You are right, I'm from Sri Lanka (Time zone - +0530). But when I run "date -u" I am getting following.

"2016 මාර්තු  1 වැනි අඟහරුවාදා 17:09:26 +0000"

By setting up

String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";

I could successfully run the test and it got passed. But I believe this is not a perfect fix since by accident if we get '2002-02-02T02:02:02.222'
when expected output is '2002-02-01T02:02:02.222', the test will still pass. So if this occurs due to a issue in functionality automation tests will miss it.

I tried

String beforeDate="2002-02-02T02:12:02.222";

and here also test passed successfully. Even though I'm not sure what is expected to test in this test case, this sounds a better solution to me. If funnctionality works fine, output for this will match the defined regex in
+1130 to -1130 time zones. What do you think? What would be the better fix?

I created a jira for this [1]. Once we finalized on the fix, I'll send a pull request to git 'develop' branch. Also is it possible to assign the created jira for me?

[1]. https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_RYA-2D44&d=BQIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=gGs-q5mWFLzFQT__sUMtnP5LZkgG2FYXGQnChlrEC1Q&s=yXAhcDuGZRRBSQyZH1O5-tw-Dr6_8B-awdFIP8po2uo&e= 

Thank You!

Amila Wijayarathna

On Tue, Mar 1, 2016 at 2:30 AM, Lotts, David <Da...@parsons.com>
wrote:

> Amila,
> I think I see the cause of the failed test.  I'm going to predict that
> your timezone is greater than +02:00.   ( I am a psychic :-) ).
>
> The test above yours: testNoZone()
> is similar, except that it specifies milliseconds and uses this regex:
> String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";
>
> It accounts for the fact that the local timezone might change the day.  
> So the fix is probably to add the same fuzzy day: "(1|2|3)" to the 
> test that is failing:  testMilliSecondsNoZone().
>
> Feel free to create a Jira issue and fix it and be a hero!
> Or just add a @Ignore above the @test and keep working and STILL be a 
> hero for find this test bug!
>
> david.
>
> -----Original Message-----
> From: Lotts, David
> Sent: Monday, February 29, 2016 3:09 PM
> To: dev@rya.incubator.apache.org
> Subject: RE: Test 'testMilliSecondsNoZone' Fails when Building from 
> Source
>
> I don't think that is a known bug.  It looks very similar to issue RYA-6.
> https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org
> _jira_browse_RYA-2D6&d=BQIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdf
> xIq10&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=gGs-q5mWFLzFQT__
> sUMtnP5LZkgG2FYXGQnChlrEC1Q&s=63s28I-cmbpkqTb_06ldxBqPHhFng2WED6F8Tu8z
> t54&e= I would not think it is a fatal problem with your environment, 
> more likely an unanticipated corner case.  I think this test was 
> formulated to find those.
>
> May I ask what your computer's time zone?
> Use a command like this:
>
>     Unix$ date -u
>
>     Windows cmd> tzutil /g
>
> and your operating system and  java version?
>
> david.
>
>
>
> -----Original Message-----
> From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com]
> Sent: Monday, February 29, 2016 2:07 PM
> To: dev@rya.incubator.apache.org
> Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from 
> Source
>
>  Hi all,
> I am getting the same issue in 'develop' branch as well .
>
> Thank you!
>
>
> *Amila Wijayarathna,*
> undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>
> On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna < 
> amwijayarathna@gmail.com> wrote:
>
> > Hi all,
> >
> > I am trying to build Apache Rya source available at [1]. I could 
> > successfully built the source by running without tests using "mvn 
> > clean install -Dmaven.test.skip=true". But when I am running the 
> > source with tests using "mvn clean install", I am getting test 
> > failure
> at [2].
> >
> > It seems like in the test 'testMilliSecondsNoZone', it pass 
> > '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it 
> > returns '2002-02-01T02:02:02.222' after deserialising and it causes 
> > the test to fail.
> >
> > Is this a know issue or am I getting this due to some 
> > incompatibility in my environment?
> >
> > Any idea on this is thoroughly appreciated.
> >
> > [1].
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apac
> > he
> > _incubator-2Drya&d=BQIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxI
> > q1 
> > 0&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=YMkoBqgmlbmrxhOslx
> > Ch 
> > aXpbBMpeTAkCqRWkaibToLM&s=hhM4nAeG7KurtBlNQNclAbVzZev4f-d2dx-Xlm6LHs
> > I&
> > e=
> > [2].
> > testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeReso
> > lv
> > erTest)  Time elapsed: 0.051 sec  <<< FAILURE!
> > java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected 
> > should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> > deserialized:2002-02-01T20:02:02.222Z
> > at org.junit.Assert.fail(Assert.java:88)
> > at org.junit.Assert.assertTrue(Assert.java:41)
> > at
> > mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSecon
> > ds
> > NoZone(DateTimeRyaTypeResolverTest.java:116)
> >
> > Thank You!
> >
> > *Amila Wijayarathna,*
> > undergraduate,
> > Faculty of Information Technology,
> > University of Moratuwa,
> > Sri Lanka.
> >
>

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by "Aaron D. Mihalik" <aa...@gmail.com>.
I have assigned the ticket to you.

On Tue, Mar 1, 2016 at 12:44 PM Amila Wijayarathna <am...@gmail.com>
wrote:

> Hi David,
>
> You are right, I'm from Sri Lanka (Time zone - +0530). But when I run "date
> -u" I am getting following.
>
> "2016 මාර්තු  1 වැනි අඟහරුවාදා 17:09:26 +0000"
>
> By setting up
>
> String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";
>
> I could successfully run the test and it got passed. But I believe this is
> not a perfect fix since by accident if we get '2002-02-02T02:02:02.222'
> when expected output is '2002-02-01T02:02:02.222', the test will still
> pass. So if this occurs due to a issue in functionality automation tests
> will miss it.
>
> I tried
>
> String beforeDate="2002-02-02T02:12:02.222";
>
> and here also test passed successfully. Even though I'm not sure what is
> expected to test in this test case, this sounds a better solution to me. If
> funnctionality works fine, output for this will match the defined regex in
> +1130 to -1130 time zones. What do you think? What would be the better fix?
>
> I created a jira for this [1]. Once we finalized on the fix, I'll send a
> pull request to git 'develop' branch. Also is it possible to assign the
> created jira for me?
>
> [1]. https://issues.apache.org/jira/browse/RYA-44
>
> Thank You!
>
> Amila Wijayarathna
>
> On Tue, Mar 1, 2016 at 2:30 AM, Lotts, David <Da...@parsons.com>
> wrote:
>
> > Amila,
> > I think I see the cause of the failed test.  I'm going to predict that
> > your timezone is greater than +02:00.   ( I am a psychic :-) ).
> >
> > The test above yours: testNoZone()
> > is similar, except that it specifies milliseconds and
> > uses this regex:
> > String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";
> >
> > It accounts for the fact that the local timezone might change the day.
> So
> > the fix is probably to add the same fuzzy day: "(1|2|3)" to the test that
> > is failing:  testMilliSecondsNoZone().
> >
> > Feel free to create a Jira issue and fix it and be a hero!
> > Or just add a @Ignore above the @test and keep working and STILL be a
> hero
> > for find this test bug!
> >
> > david.
> >
> > -----Original Message-----
> > From: Lotts, David
> > Sent: Monday, February 29, 2016 3:09 PM
> > To: dev@rya.incubator.apache.org
> > Subject: RE: Test 'testMilliSecondsNoZone' Fails when Building from
> Source
> >
> > I don't think that is a known bug.  It looks very similar to issue RYA-6.
> > https://issues.apache.org/jira/browse/RYA-6
> > I would not think it is a fatal problem with your environment, more
> likely
> > an unanticipated corner case.  I think this test was formulated to find
> > those.
> >
> > May I ask what your computer's time zone?
> > Use a command like this:
> >
> >     Unix$ date -u
> >
> >     Windows cmd> tzutil /g
> >
> > and your operating system and  java version?
> >
> > david.
> >
> >
> >
> > -----Original Message-----
> > From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com]
> > Sent: Monday, February 29, 2016 2:07 PM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from
> Source
> >
> >  Hi all,
> > I am getting the same issue in 'develop' branch as well .
> >
> > Thank you!
> >
> >
> > *Amila Wijayarathna,*
> > undergraduate,
> > Faculty of Information Technology,
> > University of Moratuwa,
> > Sri Lanka.
> >
> > On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna <
> > amwijayarathna@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > I am trying to build Apache Rya source available at [1]. I could
> > > successfully built the source by running without tests using "mvn
> > > clean install -Dmaven.test.skip=true". But when I am running the
> > > source with tests using "mvn clean install", I am getting test failure
> > at [2].
> > >
> > > It seems like in the test 'testMilliSecondsNoZone', it pass
> > > '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it
> > > returns '2002-02-01T02:02:02.222' after deserialising and it causes
> > > the test to fail.
> > >
> > > Is this a know issue or am I getting this due to some incompatibility
> > > in my environment?
> > >
> > > Any idea on this is thoroughly appreciated.
> > >
> > > [1].
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> > > _incubator-2Drya&d=BQIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq1
> > > 0&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=YMkoBqgmlbmrxhOslxCh
> > > aXpbBMpeTAkCqRWkaibToLM&s=hhM4nAeG7KurtBlNQNclAbVzZev4f-d2dx-Xlm6LHsI&
> > > e=
> > > [2].
> > > testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolv
> > > erTest)  Time elapsed: 0.051 sec  <<< FAILURE!
> > > java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected
> > > should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> > > deserialized:2002-02-01T20:02:02.222Z
> > > at org.junit.Assert.fail(Assert.java:88)
> > > at org.junit.Assert.assertTrue(Assert.java:41)
> > > at
> > > mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSeconds
> > > NoZone(DateTimeRyaTypeResolverTest.java:116)
> > >
> > > Thank You!
> > >
> > > *Amila Wijayarathna,*
> > > undergraduate,
> > > Faculty of Information Technology,
> > > University of Moratuwa,
> > > Sri Lanka.
> > >
> >
>

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by Amila Wijayarathna <am...@gmail.com>.
Hi David,

You are right, I'm from Sri Lanka (Time zone - +0530). But when I run "date
-u" I am getting following.

"2016 මාර්තු  1 වැනි අඟහරුවාදා 17:09:26 +0000"

By setting up

String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";

I could successfully run the test and it got passed. But I believe this is
not a perfect fix since by accident if we get '2002-02-02T02:02:02.222'
when expected output is '2002-02-01T02:02:02.222', the test will still
pass. So if this occurs due to a issue in functionality automation tests
will miss it.

I tried

String beforeDate="2002-02-02T02:12:02.222";

and here also test passed successfully. Even though I'm not sure what is
expected to test in this test case, this sounds a better solution to me. If
funnctionality works fine, output for this will match the defined regex in
+1130 to -1130 time zones. What do you think? What would be the better fix?

I created a jira for this [1]. Once we finalized on the fix, I'll send a
pull request to git 'develop' branch. Also is it possible to assign the
created jira for me?

[1]. https://issues.apache.org/jira/browse/RYA-44

Thank You!

Amila Wijayarathna

On Tue, Mar 1, 2016 at 2:30 AM, Lotts, David <Da...@parsons.com>
wrote:

> Amila,
> I think I see the cause of the failed test.  I'm going to predict that
> your timezone is greater than +02:00.   ( I am a psychic :-) ).
>
> The test above yours: testNoZone()
> is similar, except that it specifies milliseconds and
> uses this regex:
> String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";
>
> It accounts for the fact that the local timezone might change the day.  So
> the fix is probably to add the same fuzzy day: "(1|2|3)" to the test that
> is failing:  testMilliSecondsNoZone().
>
> Feel free to create a Jira issue and fix it and be a hero!
> Or just add a @Ignore above the @test and keep working and STILL be a hero
> for find this test bug!
>
> david.
>
> -----Original Message-----
> From: Lotts, David
> Sent: Monday, February 29, 2016 3:09 PM
> To: dev@rya.incubator.apache.org
> Subject: RE: Test 'testMilliSecondsNoZone' Fails when Building from Source
>
> I don't think that is a known bug.  It looks very similar to issue RYA-6.
> https://issues.apache.org/jira/browse/RYA-6
> I would not think it is a fatal problem with your environment, more likely
> an unanticipated corner case.  I think this test was formulated to find
> those.
>
> May I ask what your computer's time zone?
> Use a command like this:
>
>     Unix$ date -u
>
>     Windows cmd> tzutil /g
>
> and your operating system and  java version?
>
> david.
>
>
>
> -----Original Message-----
> From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com]
> Sent: Monday, February 29, 2016 2:07 PM
> To: dev@rya.incubator.apache.org
> Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from Source
>
>  Hi all,
> I am getting the same issue in 'develop' branch as well .
>
> Thank you!
>
>
> *Amila Wijayarathna,*
> undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>
> On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna <
> amwijayarathna@gmail.com> wrote:
>
> > Hi all,
> >
> > I am trying to build Apache Rya source available at [1]. I could
> > successfully built the source by running without tests using "mvn
> > clean install -Dmaven.test.skip=true". But when I am running the
> > source with tests using "mvn clean install", I am getting test failure
> at [2].
> >
> > It seems like in the test 'testMilliSecondsNoZone', it pass
> > '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it
> > returns '2002-02-01T02:02:02.222' after deserialising and it causes
> > the test to fail.
> >
> > Is this a know issue or am I getting this due to some incompatibility
> > in my environment?
> >
> > Any idea on this is thoroughly appreciated.
> >
> > [1].
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> > _incubator-2Drya&d=BQIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq1
> > 0&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=YMkoBqgmlbmrxhOslxCh
> > aXpbBMpeTAkCqRWkaibToLM&s=hhM4nAeG7KurtBlNQNclAbVzZev4f-d2dx-Xlm6LHsI&
> > e=
> > [2].
> > testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolv
> > erTest)  Time elapsed: 0.051 sec  <<< FAILURE!
> > java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected
> > should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> > deserialized:2002-02-01T20:02:02.222Z
> > at org.junit.Assert.fail(Assert.java:88)
> > at org.junit.Assert.assertTrue(Assert.java:41)
> > at
> > mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSeconds
> > NoZone(DateTimeRyaTypeResolverTest.java:116)
> >
> > Thank You!
> >
> > *Amila Wijayarathna,*
> > undergraduate,
> > Faculty of Information Technology,
> > University of Moratuwa,
> > Sri Lanka.
> >
>

RE: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by "Lotts, David" <Da...@parsons.com>.
Amila,
I think I see the cause of the failed test.  I'm going to predict that your timezone is greater than +02:00.   ( I am a psychic :-) ).

The test above yours: testNoZone()
is similar, except that it specifies milliseconds and 
uses this regex:
String afterDate="2000-01-0(1|2|3)T\\d\\d:\\d\\d:01\\.000Z";

It accounts for the fact that the local timezone might change the day.  So the fix is probably to add the same fuzzy day: "(1|2|3)" to the test that is failing:  testMilliSecondsNoZone().

Feel free to create a Jira issue and fix it and be a hero!
Or just add a @Ignore above the @test and keep working and STILL be a hero for find this test bug!

david.

-----Original Message-----
From: Lotts, David 
Sent: Monday, February 29, 2016 3:09 PM
To: dev@rya.incubator.apache.org
Subject: RE: Test 'testMilliSecondsNoZone' Fails when Building from Source

I don't think that is a known bug.  It looks very similar to issue RYA-6. https://issues.apache.org/jira/browse/RYA-6
I would not think it is a fatal problem with your environment, more likely an unanticipated corner case.  I think this test was formulated to find those.

May I ask what your computer's time zone?
Use a command like this:

    Unix$ date -u

    Windows cmd> tzutil /g

and your operating system and  java version?

david.



-----Original Message-----
From: Amila Wijayarathna [mailto:amwijayarathna@gmail.com]
Sent: Monday, February 29, 2016 2:07 PM
To: dev@rya.incubator.apache.org
Subject: Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

 Hi all,
I am getting the same issue in 'develop' branch as well .

Thank you!


*Amila Wijayarathna,*
undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna < amwijayarathna@gmail.com> wrote:

> Hi all,
>
> I am trying to build Apache Rya source available at [1]. I could 
> successfully built the source by running without tests using "mvn 
> clean install -Dmaven.test.skip=true". But when I am running the 
> source with tests using "mvn clean install", I am getting test failure at [2].
>
> It seems like in the test 'testMilliSecondsNoZone', it pass 
> '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it 
> returns '2002-02-01T02:02:02.222' after deserialising and it causes 
> the test to fail.
>
> Is this a know issue or am I getting this due to some incompatibility 
> in my environment?
>
> Any idea on this is thoroughly appreciated.
>
> [1]. 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> _incubator-2Drya&d=BQIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq1
> 0&r=ruy1rriFBFoeOJvvQWwN1h8AcdSNT3EVLrdVl7pr-iA&m=YMkoBqgmlbmrxhOslxCh
> aXpbBMpeTAkCqRWkaibToLM&s=hhM4nAeG7KurtBlNQNclAbVzZev4f-d2dx-Xlm6LHsI&
> e=
> [2].
> testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolv
> erTest)  Time elapsed: 0.051 sec  <<< FAILURE!
> java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected 
> should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> deserialized:2002-02-01T20:02:02.222Z
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at
> mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSeconds
> NoZone(DateTimeRyaTypeResolverTest.java:116)
>
> Thank You!
>
> *Amila Wijayarathna,*
> undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>

Re: Test 'testMilliSecondsNoZone' Fails when Building from Source

Posted by Amila Wijayarathna <am...@gmail.com>.
 Hi all,
I am getting the same issue in 'develop' branch as well .

Thank you!


*Amila Wijayarathna,*
undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

On Mon, Feb 29, 2016 at 11:46 PM, Amila Wijayarathna <
amwijayarathna@gmail.com> wrote:

> Hi all,
>
> I am trying to build Apache Rya source available at [1]. I could
> successfully built the source by running without tests using "mvn clean
> install -Dmaven.test.skip=true". But when I am running the source with
> tests using "mvn clean install", I am getting test failure at [2].
>
> It seems like in the test 'testMilliSecondsNoZone', it pass
> '2002-02-02T02:02:02.222' to serializeAndDeserialize method, but it returns
> '2002-02-01T02:02:02.222' after deserialising and it causes the test to
> fail.
>
> Is this a know issue or am I getting this due to some incompatibility in
> my environment?
>
> Any idea on this is thoroughly appreciated.
>
> [1]. https://github.com/apache/incubator-rya
> [2].
> testMilliSecondsNoZone(mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest)
>  Time elapsed: 0.051 sec  <<< FAILURE!
> java.lang.AssertionError: Before='2002-02-02T02:02:02.222'; Expected
> should match actual regex after='2002-02-02T\d\d:\d\d:02\.222Z'
> deserialized:2002-02-01T20:02:02.222Z
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at
> mvm.rya.api.resolver.impl.DateTimeRyaTypeResolverTest.testMilliSecondsNoZone(DateTimeRyaTypeResolverTest.java:116)
>
> Thank You!
>
> *Amila Wijayarathna,*
> undergraduate,
> Faculty of Information Technology,
> University of Moratuwa,
> Sri Lanka.
>