oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattmann, Chris A (388J)" <chris.a.mattm...@jpl.nasa.gov>
Subject Re: Unit test fail while building OODT
Date Thu, 18 Nov 2010 16:29:52 GMT
Hey Tom,

> Greetings from the "+" side of GMT.

Haha, nice to have you + siders on the list! :)

> I've cc'ed Chris in case I can't email ood-dev

Thanks!

> I have a unit test which fail while building OODT:
> 
> ================
> Running org.apache.oodt.cas.filemgr.versioning.TestDateTimeVersioner
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.497 sec <<<
FAILURE!
> ================
> 
> The test fails due to the fact that I'm GMT+2 (the default sign is "-" but "+" for me
will never be set by the code).  Good work by the unit test.

Thanks a lot, glad it caught this issue.

> 
> Here is the svn diff for my local fix. Perhaps something more water tight can be written,
 but my current fix passes the test.
> 
> Index: commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java
> ===================================================================
> --- commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java	(revision 1035603)
> +++ commons/src/main/java/org/apache/oodt/commons/util/DateConvert.java	(working copy)
> @@ -131,9 +131,9 @@
>  			}
>  
>  			// Determine the sign of the offset.
> -			String sign = "-";
> -			if (String.valueOf(tzOffsetMS).indexOf("+") != -1) {
> -				sign = "+";
> +			String sign = "+";
> +			if (String.valueOf(tzOffsetMS).indexOf("-") != -1) {
> +				sign = "-";
>  			}
>  
>  			dateString = dateString.concat(sign + hourString + ":" + minuteString);

Cool, let me test it out on the - side of the GMT and see if it works here too. Appreciate
the patch and I'll open up an issue (and provide you credit of course!) for this. in fact,
 I had a little time, so went ahead and opened the issue here [1], as OODT-62. We can collaborate
there and work on it, thanks Tom!

Cheers,
Chris

[1] http://issues.apache.org/jira/browse/OODT-62

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: Chris.Mattmann@jpl.nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Mime
View raw message