7ea075ce9e
* Unit Tests for logging.go added. * Unit Tests for logging.go added part 2 * Unit tests added for Utils package
21 lines
346 B
Go
21 lines
346 B
Go
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package telemetry
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestJitter_NegativeDuration(t *testing.T) {
|
|
duration := time.Duration(-1)
|
|
expected := time.Duration(1)
|
|
|
|
actual := jitter(duration)
|
|
|
|
assert.Equal(t, expected, actual)
|
|
}
|