We have a series of flaky tests and we have tracked the problem down to a 
few lines of code where we are interrogating timestamps. 

The core of the problem is demonstrable like this:

1) Deserialise some message containing a timestamp
2) print out the timestamp as a string
3) clone the timestamp
4) print out the cloned timestamp as a string

_logger.Debug($"Receiving data with timestamp 
{InputData.TimeStamp.ToDateTime():yyyyMMdd_HHmmssfff}"); // example 
timestamp string = 20200702_102411834

Timestamp clonedTimeStamp = InputData.TimeStamp.Clone();

_logger.Debug($"Cloned timestamp {clonedTimeStamp
.ToDateTime():yyyyMMdd_HHmmssfff}"); // example timestamp string = 
20200702_102411833

Most of the time the strings for the timestamps match, but occasionally 
they differ by 1ms.

We use the timestamps as part of names, and the tests compare the content 
of certain data structures to an expected output, if the timestamps don't 
match, the tests can't find the correct data or do comparisons between the 
wrong data structures.

Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/fbf07a73-3a74-471f-9413-207009f7e0feo%40googlegroups.com.

Reply via email to