@Test public void testRepeat() throws Exception { for (int i = 0; i < 20; i++) { try { testService.queryData(); } catch (Exception e) { System.out.println("queryData -> Exception: " + e); } try { testService.insertData("好吧"); } catch (Exception e) { System.out.println("insertData -> Exception: " + e); } try { Thread.sleep(3000); } catch (InterruptedException e) { } } }
@Test public void test() throws Exception { testService.queryData(); testService.insertData("好吧"); }