(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func TestItemContext_Current(t *testing.T) { |
| 49 | lock := &sync.Mutex{} |
| 50 | j := 0 |
| 51 | for i := 0; i < 9; i++ { |
| 52 | go func() { |
| 53 | lock.Lock() |
| 54 | fmt.Println("go", j) |
| 55 | j++ |
| 56 | v := "bar" + strconv.Itoa(j) |
| 57 | fmt.Println(v) |
| 58 | ic.Set(strconv.Itoa(j), v) |
| 59 | lock.Unlock() |
| 60 | }() |
| 61 | } |
| 62 | |
| 63 | time.Sleep(3 * time.Second) |
| 64 | |
| 65 | t.Log(ic.GetCurrentMap()) |
| 66 | |
| 67 | } |
| 68 | |
| 69 | // 性能测试 |
| 70 |
nothing calls this directly
no test coverage detected