Skip to content

Commit

Permalink
Fixing linting problems on new code
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Tanaka <[email protected]>
  • Loading branch information
pedro-stanaka committed Apr 26, 2022
1 parent d015cda commit fbf7837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pkg/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ package relay
import (
"bytes"
"fmt"
"github.com/prometheus/statsd_exporter/pkg/clock"
"net"
"strings"
"time"

"github.com/prometheus/statsd_exporter/pkg/clock"

"github.com/go-kit/log"

"github.com/prometheus/client_golang/prometheus"
Expand Down
10 changes: 5 additions & 5 deletions pkg/relay/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package relay

import (
"fmt"
"testing"
"time"

"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
"github.com/prometheus/statsd_exporter/pkg/clock"
"github.com/stvp/go-udp-testing"
"testing"
"time"
)

func TestRelay_RelayLine(t *testing.T) {
Expand All @@ -33,7 +34,6 @@ func TestRelay_RelayLine(t *testing.T) {
for _, tt := range tests {
udp.SetAddr(":1160")
t.Run(tt.name, func(t *testing.T) {

tickerCh := make(chan time.Time)
clock.ClockInstance = &clock.Clock{
TickerCh: tickerCh,
Expand All @@ -56,8 +56,8 @@ func TestRelay_RelayLine(t *testing.T) {
r.RelayLine(line)
}
// Tick time forward to trigger a packet send.
clock.ClockInstance.Instant = time.Unix(20000, 0)
clock.ClockInstance.TickerCh <- time.Unix(20000, 0)
clock.ClockInstance.Instant = time.Unix(1, 10)
clock.ClockInstance.TickerCh <- time.Unix(0, 0)
})

metrics, err := prometheus.DefaultGatherer.Gather()
Expand Down

0 comments on commit fbf7837

Please sign in to comment.