Files
nats-server/server
Ivan Kozlovic bd920c42bc Fix dirstore code and speed up some tests
When using Unix() time, since it is number of seconds, it is better
to round up the time before adding a ttl. Trying to shorten some
of the tests showed that in some cases a file was removed too early.
This was because the computed expiration with ttl fell in the same
second, so the file was removed prematurely.

So anywhere where we used to do: time.Now().Addd(ttl).Unix(), I
changed to time.Now().Round(time.Second).Add(ttl).Unix().

I was able to reduce the time of TestTTL from 21 seconds down to
less than 5. TestExpiration was also shorten.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-09-10 17:47:33 -06:00
..
2020-06-12 15:48:38 -07:00
2019-10-15 23:55:13 +08:00
2020-05-19 14:15:11 -07:00
2020-09-09 04:46:52 -07:00
2020-02-25 19:53:09 -05:00
2020-08-03 14:59:00 -06:00
2020-06-18 21:04:34 -07:00
2020-09-04 17:14:51 -04:00
2020-06-26 10:29:53 -07:00
2019-05-06 15:41:38 -07:00
2020-08-10 19:40:36 +03:00
2019-12-12 11:58:24 -07:00
2018-12-06 15:09:14 -08:00
2020-08-03 14:59:00 -06:00
2020-08-24 11:49:50 -04:00
2020-06-12 10:03:47 -06:00
2018-10-06 14:06:14 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2019-11-14 20:05:32 -07:00
2019-12-12 11:58:24 -07:00
2020-09-02 17:18:28 -07:00