storj/pkg/telemetry/utils_test.go
Yehor Butko 7ea075ce9e Unit Tests for logging.go added (#148)
* Unit Tests for logging.go added.

* Unit Tests for logging.go added part 2

* Unit tests added for Utils package
2018-07-19 15:41:29 -04:00

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)
}