Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F4B91088C for ; Wed, 6 Nov 2013 14:39:26 +0000 (UTC) Received: (qmail 89368 invoked by uid 500); 6 Nov 2013 14:38:59 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 89330 invoked by uid 500); 6 Nov 2013 14:38:56 -0000 Mailing-List: contact user-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@oodt.apache.org Delivered-To: mailing list user@oodt.apache.org Received: (qmail 89246 invoked by uid 99); 6 Nov 2013 14:38:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 14:38:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [74.125.82.171] (HELO mail-we0-f171.google.com) (74.125.82.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 14:38:44 +0000 Received: by mail-we0-f171.google.com with SMTP id t60so5062509wes.30 for ; Wed, 06 Nov 2013 06:38:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=V/pf270FUaAEu/JF+R9yEvuGqJQYH6RspsGDqJ0oiQA=; b=hCNIW9gVIFQ9hmcV3YVDjctR0DiD2xvwsiEiy6/vxhbB6qvrDub2frCXfNv4XFBHPB 962xOOK2+FPLzZDNjILYYX1EYoEbupDMrFsr2KXLEXT4eLI387aA4aWOYXdUT2Lc4umn Br1DPZSVG0jopg9tpiqi0ELUbldfpA5f9z+0f4U699oSZFxvOc6G5stbD1zduZiRmjhp 6/wZbkt1US2tdfejnora8TdFYz/uw3WQ96MuVOyLwcErh6L3Tq0N1dOJwxyyenqoHWFp 106cTA4RLBRPMAv5j8dUVVkEWBpJEwVypVydnPLP5PCr1ZLVRd84JMs+QoA9MAkj7Lz0 FLyg== X-Gm-Message-State: ALoCoQkCpzLUL3BBTRi3Z1SK2vPYtE6vQUEEGXRuGFzYSMT4pOoVx1eZdGmBzWZYqt/9D4RaJdWY X-Received: by 10.194.241.228 with SMTP id wl4mr2979490wjc.2.1383748701937; Wed, 06 Nov 2013 06:38:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.93.133 with HTTP; Wed, 6 Nov 2013 06:38:01 -0800 (PST) In-Reply-To: References: From: Tom Barber Date: Wed, 6 Nov 2013 14:38:01 +0000 Message-ID: Subject: Re: TestPathUtils#testDoDynamicReplacement() failing locally To: user@oodt.apache.org Content-Type: multipart/alternative; boundary=089e01493c32d684b304ea831986 X-Virus-Checked: Checked by ClamAV on apache.org --089e01493c32d684b304ea831986 Content-Type: text/plain; charset=ISO-8859-1 Well, I've slept quite a lot since the day i filed that patch but it was a GMT/UTC issue I thought, so I fixed it with the - long epochDiffInMilli = epoch.getTimeInMillis() - julianEpoch.getTimeInMillis() ; + long epochDiffInMilli = epoch.getTimeInMillis() - (julianEpoch.getTimeInMillis()+julianEpoch.getTimeZone().getOffset(julianEpoch.getTimeInMillis())) ; I ran a test in UTC and GMT and it passed but if the original works in PDT I guess a quick fix would be to check the timezone and apply the correct one, that said, I'm now wondering if its a Daylight Savings issue. I can take another look later if no one beats me to it. On Wed, Nov 6, 2013 at 2:26 PM, Lewis John Mcgibbney < lewis.mcgibbney@gmail.com> wrote: > Yeah I am. > Thanks for the link, it seems that this bug is still present in the > dynamicReplacement method. > I'll take a look and see what I can do. > Any ideas Tom? > Thanks > Lewis > > > On Wed, Nov 6, 2013 at 2:23 PM, Varun Ratnakar wrote: > >> Hi Lewis, >> >> Are you in UK by the way ? I had a similar issue and it turned out to be >> related to GMT. >> When I changed the timezone on my machine temporarily to PST, it compiled >> fine. >> >> Check the issue here: >> https://issues.apache.org/jira/browse/OODT-559 >> >> >> Hope that helps. >> Varun >> >> >> On 6 Nov 2013, at 13:47, Lewis John Mcgibbney >> wrote: >> >> Hi Folks, >> I am not able to install OODT trunk locally recently due to the following >> test which is failing >> >> >> https://svn.apache.org/repos/asf/oodt/trunk/metadata/src/test/org/apache/oodt/cas/metadata/util/TestPathUtils.java >> >> Here is my log output. Can anyone else reproduce this error? >> >> I am also a it confused to what PathUtils#doDynamicReplacement actually >> does. >> >> >> https://svn.apache.org/repos/asf/oodt/trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/util/PathUtils.java >> >> It is not documented and wraps several other methods. Can someone please >> help me out here? >> >> Thanks >> Lewis >> >> junit.framework.ComparisonFailure: expected:<47[50002]01.000> but >> was:<47[49966]01.000> >> at junit.framework.Assert.assertEquals(Assert.java:81) >> at junit.framework.Assert.assertEquals(Assert.java:87) >> at >> org.apache.oodt.cas.metadata.util.TestPathUtils.testDoDynamicReplacement(TestPathUtils.java:58) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:616) >> at junit.framework.TestCase.runTest(TestCase.java:164) >> at junit.framework.TestCase.runBare(TestCase.java:130) >> at junit.framework.TestResult$1.protect(TestResult.java:106) >> at junit.framework.TestResult.runProtected(TestResult.java:124) >> at junit.framework.TestResult.run(TestResult.java:109) >> at junit.framework.TestCase.run(TestCase.java:120) >> at junit.framework.TestSuite.runTest(TestSuite.java:230) >> at junit.framework.TestSuite.run(TestSuite.java:225) >> at >> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131) >> at >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >> >> -- >> *Lewis* >> >> >> > > > -- > *Lewis* > --089e01493c32d684b304ea831986 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Well, I've slept quite a lot since the day i= filed that patch but it was a GMT/UTC issue I thought, so I fixed it with = the

-=A0=A0=A0=A0=A0=A0=A0 long epochDiffInMilli =3D epoch.getTimeI= nMillis() - julianEpoch.getTimeInMillis() ;
+=A0=A0=A0=A0=A0=A0=A0 long epochDiffInMilli =3D epoch.getTimeInMillis() - = (julianEpoch.getTimeInMillis()+julianEpoch.getTimeZone().getOffset(julianEp= och.getTimeInMillis())) ;
=A0
I ran a test in UTC and GMT and i= t passed but if the original works in PDT I guess a quick fix would be to = check the timezone and apply the correct one, that said, I'm now wonder= ing if its a Daylight Savings issue.

I can take another look later if no one beats me to it.
=


On Wed, Nov 6= , 2013 at 2:26 PM, Lewis John Mcgibbney <lewis.mcgibbney@gmail.com= > wrote:
Yeah I am. <= br>
Thanks for the link, it seems that this bug is still present in th= e dynamicReplacement method.
I'll take a look and see what I can do.
Any ideas Tom?
Thanks
Lewis


On Wed, Nov 6, 2013 at 2:23 PM, Varun Ratnaka= r <varunratnakar@gmail.com> wrote:
Hi Lewis,

Are you in UK by the way = ? I had a similar issue and it turned out to be related to GMT.
When I changed the timezone on my machine temporarily to PST, it compiled f= ine.

Check the issue here:


Hope that helps.
Varun


On 6 Nov 2013, at 13:47, Lewis John Mcgibbney <lewis.mcgibbney@gma= il.com> wrote:

Thanks
Lewis

junit.framewor= k.ComparisonFailure: expected:<47[50002]01.000> but was:<47[49966]= 01.000>
=A0=A0=A0 at junit.framework.Assert.assertEquals(Assert.java:81)
=A0=A0= =A0 at junit.framework.Assert.assertEquals(Assert.java:87)
=A0=A0=A0 at = org.apache.oodt.cas.metadata.util.TestPathUtils.testDoDynamicReplacement(Te= stPathUtils.java:58)
=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces= sorImpl.java:57)
=A0=A0=A0 at sun.reflect.DelegatingMethodAccessorImpl.i= nvoke(DelegatingMethodAccessorImpl.java:43)
=A0=A0=A0 at java.lang.reflect.Method.invoke(Method.java:616)
=A0=A0=A0 = at junit.framework.TestCase.runTest(TestCase.java:164)
=A0=A0=A0 at juni= t.framework.TestCase.runBare(TestCase.java:130)
=A0=A0=A0 at junit.frame= work.TestResult$1.protect(TestResult.java:106)
=A0=A0=A0 at junit.framework.TestResult.runProtected(TestResult.java:124)=A0=A0=A0 at junit.framework.TestResult.run(TestResult.java:109)
=A0= =A0=A0 at junit.framework.TestCase.run(TestCase.java:120)
=A0=A0=A0 at j= unit.framework.TestSuite.runTest(TestSuite.java:230)
=A0=A0=A0 at junit.framework.TestSuite.run(TestSuite.java:225)
=A0=A0=A0= at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JU= nit3TestReference.java:131)
=A0=A0=A0 at org.eclipse.jdt.internal.junit.= runner.TestExecution.run(TestExecution.java:38)
=A0=A0=A0 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest= s(RemoteTestRunner.java:467)
=A0=A0=A0 at org.eclipse.jdt.internal.junit= .runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
=A0=A0=A0 a= t org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn= er.java:390)
=A0=A0=A0 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Re= moteTestRunner.java:197)

--
Lewis<= /i>




--
Lewis

--089e01493c32d684b304ea831986--