[phobos] windows tz updates breaking unit tests, again

Jonathan M Davis via phobos phobos at puremagic.com
Thu Apr 14 13:07:13 PDT 2016


On Thursday, April 14, 2016 11:33:09 Brad Roberts via phobos wrote:
> On 4/14/2016 9:35 AM, Jonathan M Davis via phobos wrote:
> > If we don't test it, we won't catch when the code is wrong due to a change
> > in Microsoft's time zone info. But the fact that it changes so frequently
> > like this is precisely why that functionality has been deprecated in favor
> > of reading the conversion data in from a file, thereby leaving it up to
> > the
> > programmer to make sure that the data is up-to-date. I think that it's
> > quite clear that hardcoding it as I did originally has proven to be a bad
> > idea. Unfortunately, it'll be a while before those functions are done
> > with the deprecation cycle and removed, so we have to continue to deal
> > with Microsoft's random changes until then.
> >
> > - Jonathan M Davis
>
> I agree that it is something that needs to be caught and adapted for,
> but I disagree that it's a unit test that should do that.  As a unit
> test, the impacts are large and disruptive.  As some other tool, it's
> minimal and still actionable.

"Some other tool" would never get run, and the unit tests are doing exactly
what unit tests normally do - test that the functions work correctly. The
fact that the tests fail as frequently as they do is just a sign that the
functions were designed badly. The tests themselves are doing exactly what
they're supposed to do.

Regardless, the functionality in question has been deprecated, so it's only
a matter of time until it's been removed and won't be a problem anymore.

- Jonathan M Davis



More information about the phobos mailing list