List of usage examples for java.lang InterruptedException printStackTrace
public void printStackTrace()
From source file:com.bbytes.zorba.event.ZorbaJobEventQueueHandlerTest.java
@Test public void testEventHandler() { try {//from w w w .j a v a 2 s.c o m Thread.currentThread().sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } Assert.assertNotNull(jobLifeCycleDao.findOne("test id 1")); }
From source file:uk.ac.kcl.testservices.BioyodieWebserviceWithoutSchedulingTests.java
@Test @DirtiesContext/*from ww w .ja v a 2 s. c o m*/ public void bioyodieTest() { jobLauncher.launchJob(); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } assertEquals(75, testUtils.countOutputDocsInES()); assertEquals(75, dbmsTestUtils.countRowsInOutputTable()); assertTrue(testUtils.getStringInEsDoc("1").contains("T061")); }
From source file:uk.ac.kcl.testservices.PdfboxWithoutSchedulingTests.java
@Test @DirtiesContext//from w ww . j a v a 2s .co m public void pdfboxPipelineTest() { jobLauncher.launchJob(); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } assertEquals(55, testUtils.countOutputDocsInES()); String testString = testUtils.getStringInEsDoc("1"); assertTrue(testString.contains("\"outputField1\":\"DUDE\"")); }
From source file:com.samples.platform.service.iss.tech.support.lockedoperation.AsyncLongRunningLockedOperation.java
/** * @see com.qpark.eip.core.spring.lockedoperation.AbstractAsyncLockableOperation#invokeOperationAsync(com.qpark.eip.core.spring.lockedoperation.LockableOperationContext) *///from ww w . j a v a2 s .com @Override protected void invokeOperationAsync(final LockableOperationContext context) { this.logger.debug("+invokeOperationAsync {} {}", this.getName(), this.getUUID()); try { Thread.sleep(60 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } this.logger.debug("-invokeOperationAsync {} {}", this.getName(), this.getUUID()); }
From source file:org.jboss.spring3_2.example.AsyncRequestMapping.mvc.MemberRestController.java
@RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = "application/json") public @ResponseBody Callable<Member> lookupMemberById(@PathVariable("id") final Long id) { return new Callable<Member>() { public Member call() { try { Thread.sleep(2000); System.out.println("Returning from AsyncCall"); } catch (InterruptedException e) { e.printStackTrace(); }/*from w ww . j a v a 2 s . c o m*/ return memberDao.findById(id); } }; }
From source file:uk.ac.kcl.it.ReindexPKPartitionWithoutScheduling.java
@Test @DirtiesContext//ww w . j a v a 2s . c o m public void reindexTest() { jobLauncher.launchJob(); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } assertEquals(75, testUtils.countOutputDocsInES()); }
From source file:uk.ac.kcl.testservices.BiolarkWebserviceWithoutSchedulingTests.java
@Ignore @Test/*ww w . j a va2 s . co m*/ @DirtiesContext public void biolarkTest() { jobLauncher.launchJob(); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } assertEquals(75, testUtils.countOutputDocsInES()); assertEquals(75, dbmsTestUtils.countRowsInOutputTable()); assertTrue(testUtils.getStringInEsDoc("1").contains("HP:0003510")); }
From source file:Main.java
public void selectionSort(final int[] x) { new Thread(new Runnable() { @Override// w ww. j av a 2 s . c o m public void run() { for (int i = 0; i < x.length - 1; i++) { int minIndex = i; for (int j = i + 1; j < x.length; j++) { if (x[minIndex] > x[j]) { minIndex = j; } } if (minIndex != i) { int temp = x[i]; x[i] = x[minIndex]; x[minIndex] = temp; } repaint(); try { Thread.sleep(ITERATION_SLEEP); } catch (InterruptedException e) { e.printStackTrace(); } } } }).start(); }
From source file:dk.clanie.actor.SecondTestActorImpl.java
private void process(String method, int arg) { Thread currentThread = Thread.currentThread(); method = getClass().getSimpleName() + "." + method; System.out.println(new Instant() + ": " + method + "(" + arg + ") START in " + currentThread); try {// w ww .j ava 2 s . c o m Thread.sleep(ActorAspectTest.SLEEPTIME); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(new Instant() + ": " + method + "(" + arg + ") DONE in " + currentThread); }
From source file:eu.enhan.timelord.test.domain.core.TimelordUserTest.java
@Transactional @Test/* w w w. j a v a2 s .c o m*/ public void testCreateUser() { TimelordUser user = new TimelordUser("me", "password", "email@mail.com"); template.save(user); logger.debug("User saved. Sleeping for 1s."); try { Thread.sleep(1000); logger.debug("Wake up, try to get it back."); TimelordUser user2 = template.findOne(user.getId(), TimelordUser.class); assertEquals(user, user2); } catch (InterruptedException e) { e.printStackTrace(); } }