Index: ssts-web/src/test/java/test/forgon/disinfectsystem/packing/PackingTableManagerTests.java =================================================================== diff -u -r16677 -r16689 --- ssts-web/src/test/java/test/forgon/disinfectsystem/packing/PackingTableManagerTests.java (.../PackingTableManagerTests.java) (revision 16677) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/packing/PackingTableManagerTests.java (.../PackingTableManagerTests.java) (revision 16689) @@ -66,7 +66,9 @@ @Autowired private BarcodeManager barcodeManager; - // 为了便于在子线程中访问装配任务,定义此全局的装配任务变量 + /** + * 为了便于在子线程中访问装配任务,定义此全局的装配任务变量 + */ PackingTask globalPackingTask; private int unpackAmount; @@ -77,18 +79,24 @@ private static final int MAX_THREADS = 1; private static final int invokeCount = 1; - int amountPerPack = 100; // 每次装配的数量 + /** + * 每次装配的数量 + */ + int amountPerPack = 100; - public int getUnpackAmount() { return unpackAmount; } public void setUnpackAmount(int unpackAmount) { this.unpackAmount = unpackAmount; } - // 并发调用该方法,验证死锁是否会发生 -// @Test + /** + * 并发调用该方法,验证死锁是否会发生 + * @throws Exception + * + */ + @Test public void testFindPackingRecordTableListConcurrent() throws Exception { initDataInSeperateThread(); @@ -182,7 +190,7 @@ } } -// @Test + @Test public void testPackingTousseConcurrent() throws Exception{ initDataInSeperateThread(); @@ -290,7 +298,7 @@ } /** - * 测试并发装配外部代理灭菌包 + * 测试并发装配外部代理灭菌包,运行所有测试用例时,打开该方法会卡住,待确认 * @throws Exception */ @Test @@ -356,7 +364,7 @@ assertEquals(MAX_THREADS * invokeCount * amountPerPack, totalTousses); } - //@Test + @Test public void testPackTousseAndForeignProxyDisinfectionConcurrent() throws TimeoutException { initDataInSeperateThread(); @@ -423,7 +431,7 @@ try { // 线程运行的超时时间设置为10分钟 - waiter.await(10 * 60 * 1000, MAX_THREADS * 2); + waiter.await(5 * 60 * 1000, MAX_THREADS * 2); totalTousses = objectDao.countObjectBySql(TousseInstance.class.getSimpleName(), sql);