Browse Source

note in trust metric test

pull/1030/head
Ethan Buchman 7 years ago
parent
commit
c1e167e330
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      p2p/trust/metric_test.go
  2. +1
    -1
      p2p/trust/ticker.go

+ 2
- 0
p2p/trust/metric_test.go View File

@ -68,7 +68,9 @@ func TestTrustMetricStopPause(t *testing.T) {
tt.NextTick()
tm.Pause()
// could be 1 or 2 because Pause and NextTick race
first := tm.Copy().numIntervals
// Allow more time to pass and check the intervals are unchanged
tt.NextTick()
tt.NextTick()


+ 1
- 1
p2p/trust/ticker.go View File

@ -24,7 +24,7 @@ type TestTicker struct {
// NewTestTicker returns our ticker used within test routines
func NewTestTicker() *TestTicker {
c := make(chan time.Time, 1)
c := make(chan time.Time)
return &TestTicker{
C: c,
}


Loading…
Cancel
Save