(t *testing.T)
| 372 | } |
| 373 | |
| 374 | func TestKeysWhenRemoving(t *testing.T) { |
| 375 | slm := NewShardLockMaps() |
| 376 | |
| 377 | Total := 100 |
| 378 | for i := 0; i < Total; i++ { |
| 379 | slm.Set(strconv.Itoa(i), TestUser{strconv.Itoa(i)}) |
| 380 | } |
| 381 | |
| 382 | Num := 10 |
| 383 | for i := 0; i < Num; i++ { |
| 384 | go func(c *ShardLockMaps, n int) { |
| 385 | c.Remove(strconv.Itoa(n)) |
| 386 | }(&slm, i) |
| 387 | } |
| 388 | keys := slm.Keys() |
| 389 | for _, k := range keys { |
| 390 | if k == "" { |
| 391 | t.Error("Empty keys returned") |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | func TestUnDrainedIterBuffered(t *testing.T) { |
| 397 | slm := NewShardLockMaps() |
nothing calls this directly
no test coverage detected