Example usage for java.lang InterruptedException printStackTrace

List of usage examples for java.lang InterruptedException printStackTrace

Introduction

In this page you can find the example usage for java.lang InterruptedException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:uk.ac.kcl.it.BasicTimestampPartitionWithoutScheduling.java

@Test
@DirtiesContext//from  ww w.ja  va 2 s . co  m
public void basicTimestampPartitionWithoutSchedulingTest() {
    jobLauncher.launchJob();
    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    assertEquals(75, testUtils.countOutputDocsInES());
    assertEquals(75, dbmsTestUtils.countRowsInOutputTable());
}

From source file:gemlite.testing.util.DBManager.java

public boolean isUseable() {
    if (!useable.get()) {
        try {//from   w  w w  . j  a va 2s.c om
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        this.connect();
    }
    return useable.get();
}

From source file:Main.java

@Override
public void run() {
    while (running) {
        try {//from   w w w.  j  a  v  a  2 s .com
            doIt(clock.getStep());
            clock.await();
        } catch (InterruptedException e) {
            running = false;
            e.printStackTrace();
        } catch (BrokenBarrierException e) {
            running = false;
            e.printStackTrace();
        }
    }
}

From source file:uk.ac.kcl.it.TikaPKPartitionWithoutScheduling.java

@Test
@DirtiesContext// w  ww.  j  av a2  s .  co  m
public void tikaPipelineTest() {
    jobLauncher.launchJob();

    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    assertEquals(1000, testUtils.countOutputDocsInES());
}

From source file:uk.ac.kcl.testservices.JdbcMapWithoutSchedulingTests.java

@Test
@DirtiesContext//from w w  w .ja  v a  2s.c  o  m
public void jdbcMapPipelineTest() {
    jobLauncher.launchJob();

    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    Map<String, Object> row = dbmsTestUtils.getRowInOutputTable(1);
    String stringContent = (String) row.getOrDefault("output", "");
    assertTrue(stringContent.contains("Disproportionate dwarfism"));
    assertEquals(65, dbmsTestUtils.countRowsInOutputTable());
    assertEquals(65, testUtils.countOutputDocsInES());
}

From source file:com.samples.platform.service.iss.tech.support.lockedoperation.SyncShortRunningLockedOperation.java

/**
 * @see com.qpark.eip.core.spring.lockedoperation.AbstractLockableOperation#invokeOperation(com.qpark.eip.core.spring.lockedoperation.LockableOperationContext)
 *///from w  ww . j a  v  a2 s .com
@Override
protected void invokeOperation(final LockableOperationContext context) {
    this.logger.debug("+invokeOperation {} {}", this.getName(), this.getUUID());
    try {
        Thread.sleep(5 * 1000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    this.logger.debug("+invokeOperation {} {}", this.getName(), this.getUUID());
}

From source file:uk.ac.kcl.it.BasicConfigurerdStartTimestampPartitionWithScheduling.java

@Test
@DirtiesContext//from   w w w  . j  a  v  a 2 s  .co m
public void basicConfigurerdStartTimestampWithSchedulingTest() {
    testUtils.insertFreshDataIntoBasicTableAfterDelay(env.getProperty("tblInputDocs"), 15000);
    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    //note, in this test, we upsert documents, overriding existng ones. hence why ther ate 75 in the index and 150
    //in the db
    assertEquals(75, testUtils.countOutputDocsInES());
    assertEquals(150, dbmsTestUtils.countRowsInOutputTable());
}

From source file:uk.ac.kcl.it.BasicPKPartitionWithoutScheduling.java

@Test
@DirtiesContext/* ww  w.  j  av a 2  s  . co  m*/
public void basicPkPartitionWithoutSchedulingTest() {
    jobLauncher.launchJob();

    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    assertEquals(75, testUtils.countOutputDocsInES());
    assertEquals(75, dbmsTestUtils.countRowsInOutputTable());

}

From source file:uk.ac.kcl.it.BasicTimestampPartitionWithScheduling.java

@Test
@DirtiesContext/*from  w  w  w  . j a v  a  2 s.  c  om*/
public void basicTimestampPartitionWithSchedulingTest() {
    testUtils.insertFreshDataIntoBasicTableAfterDelay(env.getProperty("tblInputDocs"), 15000);
    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    //note, in this test, we upsert documents, overriding existng ones. hence why there are 75 in the index and 150
    //in the db
    assertEquals(75, testUtils.countOutputDocsInES());
    assertEquals(150, dbmsTestUtils.countRowsInOutputTable());
}

From source file:com.apress.prospringintegration.channels.rendezvouschannel.TicketReceiver.java

@Override
public void run() {
    Message<?> ticketMessage;/*  w  w  w  .ja v  a  2  s. c o  m*/

    while (true) {
        ticketMessage = channel.receive(RECEIVE_TIMEOUT);
        if (ticketMessage != null) {
            handleTicket((Ticket) ticketMessage.getPayload());
        } else {
            try {
                /** Handle some other tasks **/

                Thread.sleep(1000);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        }
    }
}