01: package test.thread;
02:
03: import java.util.HashMap;
04: import java.util.Map;
05:
06: import org.testng.annotations.Test;
07:
08: public class B {
09: public static Map<Long, Long> m_threadIds;
10:
11: public static void setUp() {
12: m_threadIds = new HashMap<Long, Long>();
13: }
14:
15: @Test
16: public void f2() {
17: Long id = Thread.currentThread().getId();
18: m_threadIds.put(id, id);
19: }
20:
21: private static void ppp(String s) {
22: System.out.println("[FactoryTest] " + s);
23: }
24:
25: }
|