clarencen/lshift — Issue #107: Tests are timezone sensitive
Author: clarencen
Created: 2011-11-14 22:41:44+00:00
State: open

When you run the build in a non-GMT timezone, some tests fail:

@@@
Failed tests:
deletingSource(net.lshift.diffa.kernel.differencing.LuceneVersionCorrelationStoreTest)
deletingDest(net.lshift.diffa.kernel.differencing.LuceneVersionCorrelationStoreTest)
queryUpstreamRangeReturnsInIDOrder(net.lshift.diffa.kernel.differencing.LuceneVersionCorrelationStoreTest)
queryDownstreamRangeReturnsInIDOrder(net.lshift.diffa.kernel.differencing.LuceneVersionCorrelationStoreTest)
schematize(net.lshift.diffa.kernel.config.EndpointTest)
@@@

This appears to be due to differences in date comparisons, see the attached Surefire reports.

Furthermore, as part of #204, some questionable date handling w.r.t. time zones appears to have crept into the code base. My suggestion is to centralize all date parsing and make sure that time zones are handled consistently.