本文整理了Java中org.pentaho.di.job.Job.fireJobFinishListeners()
方法的一些代码示例,展示了Job.fireJobFinishListeners()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.fireJobFinishListeners()
方法的具体详情如下:
包路径:org.pentaho.di.job.Job
类名称:Job
方法名:fireJobFinishListeners
[英]Sets the finished flag.Then launch all the job listeners and call the jobFinished method for each.
[中]设置完成标志。然后启动所有作业侦听器,并为每个侦听器调用jobFinished方法。
代码示例来源:origin: pentaho/pentaho-kettle
@Test
public void testRunWithExceptionOnExecuteAndFireJobSetsResult() throws KettleException {
when( mockJob.isStopped() ).thenReturn( false );
when( mockJob.getParentJob() ).thenReturn( parentJob );
when( parentJob.isStopped() ).thenReturn( false );
when( mockJob.execute( Mockito.anyInt(), Mockito.any( Result.class ) ) ).thenReturn( mockResult );
doThrow( KettleException.class ).when( mockJob ).execute( anyInt(), any( Result.class ) );
doThrow( Exception.class ).when( mockJob ).fireJobFinishListeners();
jobRunner.run();
verify( mockJob, times( 1 ) ).setResult( Mockito.any( Result.class ) );
assertTrue( jobRunner.isFinished() );
}
代码示例来源:origin: pentaho/pentaho-kettle
@Test
public void testRunWithExceptionOnFireJobSetsResult() throws KettleException {
when( mockJob.isStopped() ).thenReturn( false );
when( mockJob.getParentJob() ).thenReturn( parentJob );
when( parentJob.isStopped() ).thenReturn( false );
when( mockJob.execute( Mockito.anyInt(), Mockito.any( Result.class ) ) ).thenReturn( mockResult );
doThrow( Exception.class ).when( mockJob ).fireJobFinishListeners();
jobRunner.run();
verify( mockJob, times( 1 ) ).setResult( Mockito.any( Result.class ) );
assertTrue( jobRunner.isFinished() );
}
代码示例来源:origin: pentaho/pentaho-kettle
@Test
public void testRunWithException() throws Exception {
when( mockJob.isStopped() ).thenReturn( false );
when( mockJob.getParentJob() ).thenReturn( parentJob );
when( mockJob.getJobMeta() ).thenReturn( mockJobMeta );
when( parentJob.isStopped() ).thenReturn( false );
doThrow( KettleException.class ).when( mockJob ).execute( anyInt(), any( Result.class ) );
jobRunner.run();
verify( mockResult, times( 1 ) ).setNrErrors( Mockito.anyInt() );
//[PDI-14981] catch more general exception to prevent thread hanging
doThrow( Exception.class ).when( mockJob ).fireJobFinishListeners();
jobRunner.run();
}
代码示例来源:origin: pentaho/pentaho-kettle
getExecutorJob().getJobMeta().disposeEmbeddedMetastoreProvider();
log.logDebug( BaseMessages.getString( PKG, "JobExecutor.Log.DisposeEmbeddedMetastore" ) );
data.executorJob.fireJobFinishListeners();
} catch ( KettleException e ) {
result.setNrErrors( 1 );
代码示例来源:origin: pentaho/pentaho-kettle
job.getJobMeta().disposeEmbeddedMetastoreProvider();
log.logDebug( BaseMessages.getString( PKG, "Job.Log.DisposeEmbeddedMetastore" ) );
job.fireJobFinishListeners();
代码示例来源:origin: pentaho/pentaho-kettle
log.logDebug( BaseMessages.getString( PKG, "Job.Log.DisposeEmbeddedMetastore" ) );
fireJobFinishListeners();
内容来源于网络,如有侵权,请联系作者删除!