IntegerDistribution breaks when given negative values
As found in legacy/trac#27981 (moved), our unit tests fail when being run in 1990.
The reason is that we're using a hard-coded time for sending the request (2013-04-24 12:22:22) and the current system time for determining when we handled the request. We compute the difference of the two timestamps as the time needed for handling the request. But IntegerDistribution
does not accept negative values.
That's a bug. It should either reject negative values in its addLong
method, or it should store them and include them in the result. I'd prefer the second variant, even though we're not using it for negative values under normal circumstances.
Not blocking the upcoming 8.0 protocol update.