Millisecond comparison breaks tests after Sybase persist

Still frustrated having wasted some precious time trying to debug some failing tests –>

Tests were failing when comparing Date values on a business object before and after persistence to Sybase ASE dataserver.
I thought it was my custom built http proxy service corrupting business data. But no.

It turns out Sybase only stores times to an accuracy of 1/300th of a second. Well that’s just great.
So sometimes the date tests pass, other times they are out by a millisecond or two on deserialisation

Link to Transact SQL guide

Words fail me at this point. Off for a cup of tea.


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply