@Test public void testRun() { assertNotNull(blockProcessTask); if(downloadService.isDownloadSuccess().isSuccess()) { downloadService.setDownloadSuccess(false); } ConsensusStatusContext.setConsensusStatus(ConsensusStatus.WAIT_RUNNING); blockProcessTask.run(); assert(!ConsensusStatusContext.isRunning()); downloadService.setDownloadSuccess(true); blockProcessTask.run(); assert(ConsensusStatusContext.isRunning()); }
@Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } BlockProcessTask(BlockProcess blockProcess); }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } BlockProcessTask(BlockProcess blockProcess); @Override void run(); }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } BlockProcessTask(BlockProcess blockProcess); @Override void run();  }