You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oodt.apache.org by Lewis John Mcgibbney <le...@gmail.com> on 2013/11/06 14:47:18 UTC

TestPathUtils#testDoDynamicReplacement() failing locally

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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
Well bugger, never saw the comment that it then broke PDT, you can't win
can you? I'll have to take another look at that patch :)


On Wed, Nov 6, 2013 at 2:23 PM, Varun Ratnakar <va...@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
> 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 <le...@gmail.com>
> 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*
>
>
>

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
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 <va...@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
>> 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 <le...@gmail.com>
>> 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*
>

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
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 <va...@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
>> 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 <le...@gmail.com>
>> 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*
>

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Lewis John Mcgibbney <le...@gmail.com>.
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 <va...@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
> 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 <le...@gmail.com>
> 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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
Well bugger, never saw the comment that it then broke PDT, you can't win
can you? I'll have to take another look at that patch :)


On Wed, Nov 6, 2013 at 2:23 PM, Varun Ratnakar <va...@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
> 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 <le...@gmail.com>
> 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*
>
>
>

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Lewis John Mcgibbney <le...@gmail.com>.
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 <va...@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
> 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 <le...@gmail.com>
> 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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Varun Ratnakar <va...@gmail.com>.
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 <le...@gmail.com> 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 


Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Varun Ratnakar <va...@gmail.com>.
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 <le...@gmail.com> 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 


Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
Yeah I saw it later, I didn't realise I don't get comment updates by 
default. I'll figure it out and commit something else.

On 07/11/13 15:06, Chris Mattmann wrote:
> Hi Tom,
>
> I tried applying your patch, but it didn't seem to work in all cases,
> so I had to revert a while back. It's all there in JIRA. I haven't had
> a chance to look at it since.
>
> Any help would be appreciated ;)
>
> Cheers,
> Chris
>
>
>
>
> -----Original Message-----
> From: Tom Barber <to...@meteorite.bi>
> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Date: Wednesday, November 6, 2013 2:21 PM
> To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Subject: Re: TestPathUtils#testDoDynamicReplacement() failing locally
>
>> Evening all,
>>
>>
>> I can confirm that without my patch, my test fails, with my patch and my
>> timezone swapped to PST the test then fails. Did anyone fix it, or should
>> I take a look?
>>
>>
>> Cheers
>>
>> Tom
>>
>>
>>
>> On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J)
>> <pa...@jpl.nasa.gov> wrote:
>>
>> Lewis,
>>
>>
>> Haven't tried installing from the trunk recently but IIRC the PathUtils
>> is sort of a string replace utility that utilizes environment variables
>> and metadata. This class is used pervasively throughout the codebase.
>> Here is an example of what it does:
>>
>>
>> Metadata metadata = new Metadata();
>> metadata.addMetadata("Collection", "production");
>> String output =
>> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]"
>> , metadata);
>>
>>
>> If there is an environment variable of VERSION set to say "0.2" then
>> output would be:
>> /usr/local/archive/production/0.2
>>
>>
>> One more way under documented feature of this class is the ability to
>> generate dates to a particular precision and format them. I'd give an
>> example here but I don¹t want to do so inaccurately so maybe someone else
>> will chime in.
>>
>>
>> --Paul
>>
>>
>>
>>
>> From: Lewis John Mcgibbney <le...@gmail.com>
>> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Date: Wednesday, November 6, 2013 6:47 AM
>> To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>>
>>
>>
>>
>> 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/o
>> odt/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/apa
>> che/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(T
>> estPathUtils.java:58)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>> 57)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>> pl.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(JUnit
>> 3TestReference.java:131)
>>     at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java
>> :38)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>> Runner.java:467)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>> Runner.java:683)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunne
>> r.java:390)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunn
>> er.java:197)
>>
>> -- 
>> Lewis
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>


-- 
*Tom Barber* | Technical Director

meteorite bi
*T:* +44 20 8133 3730
*W:* www.meteorite.bi | *Skype:* meteorite.consulting
*A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
Yeah I saw it later, I didn't realise I don't get comment updates by 
default. I'll figure it out and commit something else.

On 07/11/13 15:06, Chris Mattmann wrote:
> Hi Tom,
>
> I tried applying your patch, but it didn't seem to work in all cases,
> so I had to revert a while back. It's all there in JIRA. I haven't had
> a chance to look at it since.
>
> Any help would be appreciated ;)
>
> Cheers,
> Chris
>
>
>
>
> -----Original Message-----
> From: Tom Barber <to...@meteorite.bi>
> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Date: Wednesday, November 6, 2013 2:21 PM
> To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Subject: Re: TestPathUtils#testDoDynamicReplacement() failing locally
>
>> Evening all,
>>
>>
>> I can confirm that without my patch, my test fails, with my patch and my
>> timezone swapped to PST the test then fails. Did anyone fix it, or should
>> I take a look?
>>
>>
>> Cheers
>>
>> Tom
>>
>>
>>
>> On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J)
>> <pa...@jpl.nasa.gov> wrote:
>>
>> Lewis,
>>
>>
>> Haven't tried installing from the trunk recently but IIRC the PathUtils
>> is sort of a string replace utility that utilizes environment variables
>> and metadata. This class is used pervasively throughout the codebase.
>> Here is an example of what it does:
>>
>>
>> Metadata metadata = new Metadata();
>> metadata.addMetadata("Collection", "production");
>> String output =
>> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]"
>> , metadata);
>>
>>
>> If there is an environment variable of VERSION set to say "0.2" then
>> output would be:
>> /usr/local/archive/production/0.2
>>
>>
>> One more way under documented feature of this class is the ability to
>> generate dates to a particular precision and format them. I'd give an
>> example here but I don¹t want to do so inaccurately so maybe someone else
>> will chime in.
>>
>>
>> --Paul
>>
>>
>>
>>
>> From: Lewis John Mcgibbney <le...@gmail.com>
>> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Date: Wednesday, November 6, 2013 6:47 AM
>> To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>>
>>
>>
>>
>> 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/o
>> odt/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/apa
>> che/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(T
>> estPathUtils.java:58)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>> 57)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>> pl.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(JUnit
>> 3TestReference.java:131)
>>     at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java
>> :38)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>> Runner.java:467)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>> Runner.java:683)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunne
>> r.java:390)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunn
>> er.java:197)
>>
>> -- 
>> Lewis
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>


-- 
*Tom Barber* | Technical Director

meteorite bi
*T:* +44 20 8133 3730
*W:* www.meteorite.bi | *Skype:* meteorite.consulting
*A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Chris Mattmann <ma...@apache.org>.
Hi Tom,

I tried applying your patch, but it didn't seem to work in all cases,
so I had to revert a while back. It's all there in JIRA. I haven't had
a chance to look at it since.

Any help would be appreciated ;)

Cheers,
Chris




-----Original Message-----
From: Tom Barber <to...@meteorite.bi>
Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
Date: Wednesday, November 6, 2013 2:21 PM
To: "user@oodt.apache.org" <us...@oodt.apache.org>
Subject: Re: TestPathUtils#testDoDynamicReplacement() failing locally

>Evening all,
>
>
>I can confirm that without my patch, my test fails, with my patch and my
>timezone swapped to PST the test then fails. Did anyone fix it, or should
>I take a look?
>
>
>Cheers
>
>Tom
>
>
>
>On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J)
><pa...@jpl.nasa.gov> wrote:
>
>Lewis,
>
>
>Haven't tried installing from the trunk recently but IIRC the PathUtils
>is sort of a string replace utility that utilizes environment variables
>and metadata. This class is used pervasively throughout the codebase.
>Here is an example of what it does:
>
>
>Metadata metadata = new Metadata();
>metadata.addMetadata("Collection", "production");
>String output = 
>PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]"
>, metadata);
>
>
>If there is an environment variable of VERSION set to say "0.2" then
>output would be:
>/usr/local/archive/production/0.2
>
>
>One more way under documented feature of this class is the ability to
>generate dates to a particular precision and format them. I'd give an
>example here but I don¹t want to do so inaccurately so maybe someone else
>will chime in. 
>
>
>--Paul
>
>
>
>
>From: Lewis John Mcgibbney <le...@gmail.com>
>Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
>Date: Wednesday, November 6, 2013 6:47 AM
>To: "user@oodt.apache.org" <us...@oodt.apache.org>
>Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>
>
>
>
>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/o
>odt/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/apa
>che/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(T
>estPathUtils.java:58)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at 
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>57)
>    at 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>pl.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(JUnit
>3TestReference.java:131)
>    at 
>org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java
>:38)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>Runner.java:467)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>Runner.java:683)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunne
>r.java:390)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunn
>er.java:197)
>
>-- 
>Lewis
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Hi Tom,
I am working on OODT-658 now so commented out this test case for the time.
If your able to take a look it would be a huge help.
Best
Lewis


On Wed, Nov 6, 2013 at 9:21 PM, Tom Barber <to...@meteorite.bi> wrote:

> Evening all,
>
> I can confirm that without my patch, my test fails, with my patch and my
> timezone swapped to PST the test then fails. Did anyone fix it, or should I
> take a look?
>
> Cheers
>
> Tom
>
>
> On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J) <
> paul.m.ramirez@jpl.nasa.gov> wrote:
>
>>  Lewis,
>>
>>  Haven't tried installing from the trunk recently but IIRC the PathUtils
>> is sort of a string replace utility that utilizes environment variables and
>> metadata. This class is used pervasively throughout the codebase. Here is
>> an example of what it does:
>>
>>  Metadata metadata = new Metadata();
>> metadata.addMetadata("Collection", "production");
>> String output =
>> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]",
>> metadata);
>>
>>  If there is an environment variable of VERSION set to say "0.2" then
>> output would be:
>> /usr/local/archive/production/0.2
>>
>>  One more way under documented feature of this class is the ability to
>> generate dates to a particular precision and format them. I'd give an
>> example here but I don’t want to do so inaccurately so maybe someone else
>> will chime in.
>>
>>  --Paul
>>
>>
>>   From: Lewis John Mcgibbney <le...@gmail.com>
>> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Date: Wednesday, November 6, 2013 6:47 AM
>> To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>>
>>     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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Hi Tom,
I am working on OODT-658 now so commented out this test case for the time.
If your able to take a look it would be a huge help.
Best
Lewis


On Wed, Nov 6, 2013 at 9:21 PM, Tom Barber <to...@meteorite.bi> wrote:

> Evening all,
>
> I can confirm that without my patch, my test fails, with my patch and my
> timezone swapped to PST the test then fails. Did anyone fix it, or should I
> take a look?
>
> Cheers
>
> Tom
>
>
> On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J) <
> paul.m.ramirez@jpl.nasa.gov> wrote:
>
>>  Lewis,
>>
>>  Haven't tried installing from the trunk recently but IIRC the PathUtils
>> is sort of a string replace utility that utilizes environment variables and
>> metadata. This class is used pervasively throughout the codebase. Here is
>> an example of what it does:
>>
>>  Metadata metadata = new Metadata();
>> metadata.addMetadata("Collection", "production");
>> String output =
>> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]",
>> metadata);
>>
>>  If there is an environment variable of VERSION set to say "0.2" then
>> output would be:
>> /usr/local/archive/production/0.2
>>
>>  One more way under documented feature of this class is the ability to
>> generate dates to a particular precision and format them. I'd give an
>> example here but I don’t want to do so inaccurately so maybe someone else
>> will chime in.
>>
>>  --Paul
>>
>>
>>   From: Lewis John Mcgibbney <le...@gmail.com>
>> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Date: Wednesday, November 6, 2013 6:47 AM
>> To: "user@oodt.apache.org" <us...@oodt.apache.org>
>> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>>
>>     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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Chris Mattmann <ma...@apache.org>.
Hi Tom,

I tried applying your patch, but it didn't seem to work in all cases,
so I had to revert a while back. It's all there in JIRA. I haven't had
a chance to look at it since.

Any help would be appreciated ;)

Cheers,
Chris




-----Original Message-----
From: Tom Barber <to...@meteorite.bi>
Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
Date: Wednesday, November 6, 2013 2:21 PM
To: "user@oodt.apache.org" <us...@oodt.apache.org>
Subject: Re: TestPathUtils#testDoDynamicReplacement() failing locally

>Evening all,
>
>
>I can confirm that without my patch, my test fails, with my patch and my
>timezone swapped to PST the test then fails. Did anyone fix it, or should
>I take a look?
>
>
>Cheers
>
>Tom
>
>
>
>On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J)
><pa...@jpl.nasa.gov> wrote:
>
>Lewis,
>
>
>Haven't tried installing from the trunk recently but IIRC the PathUtils
>is sort of a string replace utility that utilizes environment variables
>and metadata. This class is used pervasively throughout the codebase.
>Here is an example of what it does:
>
>
>Metadata metadata = new Metadata();
>metadata.addMetadata("Collection", "production");
>String output = 
>PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]"
>, metadata);
>
>
>If there is an environment variable of VERSION set to say "0.2" then
>output would be:
>/usr/local/archive/production/0.2
>
>
>One more way under documented feature of this class is the ability to
>generate dates to a particular precision and format them. I'd give an
>example here but I don¹t want to do so inaccurately so maybe someone else
>will chime in. 
>
>
>--Paul
>
>
>
>
>From: Lewis John Mcgibbney <le...@gmail.com>
>Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
>Date: Wednesday, November 6, 2013 6:47 AM
>To: "user@oodt.apache.org" <us...@oodt.apache.org>
>Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>
>
>
>
>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/o
>odt/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/apa
>che/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(T
>estPathUtils.java:58)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at 
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>57)
>    at 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>pl.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(JUnit
>3TestReference.java:131)
>    at 
>org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java
>:38)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>Runner.java:467)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest
>Runner.java:683)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunne
>r.java:390)
>    at 
>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunn
>er.java:197)
>
>-- 
>Lewis
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
Evening all,

I can confirm that without my patch, my test fails, with my patch and my
timezone swapped to PST the test then fails. Did anyone fix it, or should I
take a look?

Cheers

Tom


On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J) <
paul.m.ramirez@jpl.nasa.gov> wrote:

>  Lewis,
>
>  Haven't tried installing from the trunk recently but IIRC the PathUtils
> is sort of a string replace utility that utilizes environment variables and
> metadata. This class is used pervasively throughout the codebase. Here is
> an example of what it does:
>
>  Metadata metadata = new Metadata();
> metadata.addMetadata("Collection", "production");
> String output =
> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]",
> metadata);
>
>  If there is an environment variable of VERSION set to say "0.2" then
> output would be:
> /usr/local/archive/production/0.2
>
>  One more way under documented feature of this class is the ability to
> generate dates to a particular precision and format them. I'd give an
> example here but I don’t want to do so inaccurately so maybe someone else
> will chime in.
>
>  --Paul
>
>
>   From: Lewis John Mcgibbney <le...@gmail.com>
> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Date: Wednesday, November 6, 2013 6:47 AM
> To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>
>     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*
>
>

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Tom Barber <to...@meteorite.bi>.
Evening all,

I can confirm that without my patch, my test fails, with my patch and my
timezone swapped to PST the test then fails. Did anyone fix it, or should I
take a look?

Cheers

Tom


On Wed, Nov 6, 2013 at 7:41 AM, Ramirez, Paul M (398J) <
paul.m.ramirez@jpl.nasa.gov> wrote:

>  Lewis,
>
>  Haven't tried installing from the trunk recently but IIRC the PathUtils
> is sort of a string replace utility that utilizes environment variables and
> metadata. This class is used pervasively throughout the codebase. Here is
> an example of what it does:
>
>  Metadata metadata = new Metadata();
> metadata.addMetadata("Collection", "production");
> String output =
> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]",
> metadata);
>
>  If there is an environment variable of VERSION set to say "0.2" then
> output would be:
> /usr/local/archive/production/0.2
>
>  One more way under documented feature of this class is the ability to
> generate dates to a particular precision and format them. I'd give an
> example here but I don’t want to do so inaccurately so maybe someone else
> will chime in.
>
>  --Paul
>
>
>   From: Lewis John Mcgibbney <le...@gmail.com>
> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Date: Wednesday, November 6, 2013 6:47 AM
> To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>
>     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*
>
>

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Thanks for explanation Paul.


On Wed, Nov 6, 2013 at 3:41 PM, Ramirez, Paul M (398J) <
paul.m.ramirez@jpl.nasa.gov> wrote:

>  Lewis,
>
>  Haven't tried installing from the trunk recently but IIRC the PathUtils
> is sort of a string replace utility that utilizes environment variables and
> metadata. This class is used pervasively throughout the codebase. Here is
> an example of what it does:
>
>  Metadata metadata = new Metadata();
> metadata.addMetadata("Collection", "production");
> String output =
> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]",
> metadata);
>
>  If there is an environment variable of VERSION set to say "0.2" then
> output would be:
> /usr/local/archive/production/0.2
>
>  One more way under documented feature of this class is the ability to
> generate dates to a particular precision and format them. I'd give an
> example here but I don’t want to do so inaccurately so maybe someone else
> will chime in.
>
>  --Paul
>
>
>   From: Lewis John Mcgibbney <le...@gmail.com>
> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Date: Wednesday, November 6, 2013 6:47 AM
> To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>
>     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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Thanks for explanation Paul.


On Wed, Nov 6, 2013 at 3:41 PM, Ramirez, Paul M (398J) <
paul.m.ramirez@jpl.nasa.gov> wrote:

>  Lewis,
>
>  Haven't tried installing from the trunk recently but IIRC the PathUtils
> is sort of a string replace utility that utilizes environment variables and
> metadata. This class is used pervasively throughout the codebase. Here is
> an example of what it does:
>
>  Metadata metadata = new Metadata();
> metadata.addMetadata("Collection", "production");
> String output =
> PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]",
> metadata);
>
>  If there is an environment variable of VERSION set to say "0.2" then
> output would be:
> /usr/local/archive/production/0.2
>
>  One more way under documented feature of this class is the ability to
> generate dates to a particular precision and format them. I'd give an
> example here but I don’t want to do so inaccurately so maybe someone else
> will chime in.
>
>  --Paul
>
>
>   From: Lewis John Mcgibbney <le...@gmail.com>
> Reply-To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Date: Wednesday, November 6, 2013 6:47 AM
> To: "user@oodt.apache.org" <us...@oodt.apache.org>
> Subject: TestPathUtils#testDoDynamicReplacement() failing locally
>
>     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*

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>.
Lewis,

Haven't tried installing from the trunk recently but IIRC the PathUtils is sort of a string replace utility that utilizes environment variables and metadata. This class is used pervasively throughout the codebase. Here is an example of what it does:

Metadata metadata = new Metadata();
metadata.addMetadata("Collection", "production");
String output = PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]", metadata);

If there is an environment variable of VERSION set to say "0.2" then output would be:
/usr/local/archive/production/0.2

One more way under documented feature of this class is the ability to generate dates to a particular precision and format them. I'd give an example here but I don’t want to do so inaccurately so maybe someone else will chime in.

--Paul


From: Lewis John Mcgibbney <le...@gmail.com>>
Reply-To: "user@oodt.apache.org<ma...@oodt.apache.org>" <us...@oodt.apache.org>>
Date: Wednesday, November 6, 2013 6:47 AM
To: "user@oodt.apache.org<ma...@oodt.apache.org>" <us...@oodt.apache.org>>
Subject: TestPathUtils#testDoDynamicReplacement() failing locally

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

Re: TestPathUtils#testDoDynamicReplacement() failing locally

Posted by "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>.
Lewis,

Haven't tried installing from the trunk recently but IIRC the PathUtils is sort of a string replace utility that utilizes environment variables and metadata. This class is used pervasively throughout the codebase. Here is an example of what it does:

Metadata metadata = new Metadata();
metadata.addMetadata("Collection", "production");
String output = PathUtils.doDynamicReplacement("/usr/local/archive/[Collection]/[VERSION]", metadata);

If there is an environment variable of VERSION set to say "0.2" then output would be:
/usr/local/archive/production/0.2

One more way under documented feature of this class is the ability to generate dates to a particular precision and format them. I'd give an example here but I don’t want to do so inaccurately so maybe someone else will chime in.

--Paul


From: Lewis John Mcgibbney <le...@gmail.com>>
Reply-To: "user@oodt.apache.org<ma...@oodt.apache.org>" <us...@oodt.apache.org>>
Date: Wednesday, November 6, 2013 6:47 AM
To: "user@oodt.apache.org<ma...@oodt.apache.org>" <us...@oodt.apache.org>>
Subject: TestPathUtils#testDoDynamicReplacement() failing locally

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