(t *testing.T)
| 18 | } |
| 19 | |
| 20 | func TestRandomTokenGenerator_IgnoresOldTokens(t *testing.T) { |
| 21 | tokenGenerator := NewRandomTokenGenerator() |
| 22 | first := tokenGenerator.GenerateTokens(1000000, nil) |
| 23 | second := tokenGenerator.GenerateTokens(1000000, first) |
| 24 | |
| 25 | dups := make(map[uint32]bool) |
| 26 | |
| 27 | for _, v := range first { |
| 28 | dups[v] = true |
| 29 | } |
| 30 | |
| 31 | for _, v := range second { |
| 32 | if dups[v] { |
| 33 | t.Fatal("GenerateTokens returned old token") |
| 34 | } |
| 35 | } |
| 36 | } |
nothing calls this directly
no test coverage detected