(t *testing.T)
| 17 | ) |
| 18 | |
| 19 | func TestTimeFromMillis(t *testing.T) { |
| 20 | var testExpr = []struct { |
| 21 | input int64 |
| 22 | expected time.Time |
| 23 | }{ |
| 24 | {input: 1000, expected: time.Unix(1, 0)}, |
| 25 | {input: 1500, expected: time.Unix(1, 500*nanosecondsInMillisecond)}, |
| 26 | } |
| 27 | |
| 28 | for i, c := range testExpr { |
| 29 | t.Run(fmt.Sprint(i), func(t *testing.T) { |
| 30 | res := TimeFromMillis(c.input) |
| 31 | require.Equal(t, c.expected, res) |
| 32 | }) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | func TestDurationWithJitter(t *testing.T) { |
| 37 | const numRuns = 1000 |
nothing calls this directly
no test coverage detected