directory structure change to work with glide
glide has its own requirements. My previous workaround caused me some code checkin errors. Need to fix this.
This commit is contained in:
19
weed/stats/duration_counter_test.go
Normal file
19
weed/stats/duration_counter_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package stats
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestRobinCounter(t *testing.T) {
|
||||
rrc := NewRoundRobinCounter(60)
|
||||
rrc.Add(0, 1)
|
||||
rrc.Add(50, 2)
|
||||
if rrc.Count() != 2 {
|
||||
t.Fatal()
|
||||
}
|
||||
if rrc.Sum() != 3 {
|
||||
t.Fatal()
|
||||
}
|
||||
/*
|
||||
index out of range
|
||||
*/
|
||||
rrc.Add(61, 1)
|
||||
}
|
||||
Reference in New Issue
Block a user