# | Line 150 | Line 150 | public class ThreadPoolExecutorTest exte | |
---|---|---|
150 | ThreadPoolExecutor one = new ThreadPoolExecutor(1, 1, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); | |
151 | try { | |
152 | assertEquals(0, one.getTaskCount()); | |
153 | < | for(int i = 0; i < 5; i++) |
154 | < | one.execute(new MediumRunnable()); |
153 | > | one.execute(new MediumRunnable()); |
154 | Thread.sleep(SHORT_DELAY_MS); | |
155 | < | assertEquals(5, one.getTaskCount()); |
155 | > | assertEquals(1, one.getTaskCount()); |
156 | } catch(Exception e){ | |
157 | fail("unexpected exception"); | |
158 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |