(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestItem_IsExpired(t *testing.T) { |
| 56 | if !testutils.IsSingleTesting() { |
| 57 | return |
| 58 | } |
| 59 | |
| 60 | var item = counters.NewItem[uint32](10) |
| 61 | t.Log(item.IsExpired(time.Now().Unix())) |
| 62 | time.Sleep(10 * time.Second) |
| 63 | t.Log(item.IsExpired(time.Now().Unix())) |
| 64 | time.Sleep(2 * time.Second) |
| 65 | t.Log(item.IsExpired(time.Now().Unix())) |
| 66 | time.Sleep(2 * time.Second) |
| 67 | t.Log(item.IsExpired(time.Now().Unix())) |
| 68 | } |
| 69 | |
| 70 | func BenchmarkItem_Increase(b *testing.B) { |
| 71 | runtime.GOMAXPROCS(1) |
nothing calls this directly
no test coverage detected