congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JobStep.afterPropertiesSet
Code IndexAdd Tabnine to your IDE (free)

How to use
afterPropertiesSet
method
in
org.springframework.batch.core.step.job.JobStep

Best Java code snippets using org.springframework.batch.core.step.job.JobStep.afterPropertiesSet (Showing top 12 results out of 315)

origin: spring-projects/spring-batch

/**
 * Test method for
 * {@link org.springframework.batch.core.step.job.JobStep#afterPropertiesSet()}
 * .
 */
@Test(expected = IllegalStateException.class)
public void testAfterPropertiesSet() throws Exception {
  step.afterPropertiesSet();
}
origin: spring-projects/spring-batch

/**
 * Test method for
 * {@link org.springframework.batch.core.step.job.JobStep#afterPropertiesSet()}
 * .
 */
@Test(expected = IllegalStateException.class)
public void testAfterPropertiesSetWithNoLauncher() throws Exception {
  step.setJob(new JobSupport("child"));
  step.setJobLauncher(null);
  step.afterPropertiesSet();
}
origin: spring-projects/spring-batch

@Test
public void testExecuteException() throws Exception {
  step.setJob(new JobSupport("child") {
    @Override
    public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
      throw new RuntimeException("FOO");
    }
  });
  step.afterPropertiesSet();
  step.execute(stepExecution);
  assertEquals(BatchStatus.FAILED, stepExecution.getStatus());
  assertEquals("FOO", stepExecution.getFailureExceptions().get(0).getMessage());
}
origin: spring-projects/spring-batch

@Test
public void testExecuteFailure() throws Exception {
  step.setJob(new JobSupport("child") {
    @Override
    public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
      execution.setStatus(BatchStatus.FAILED);
      execution.setEndTime(new Date());
    }
  });
  step.afterPropertiesSet();
  step.execute(stepExecution);
  assertEquals(BatchStatus.FAILED, stepExecution.getStatus());
}
origin: spring-projects/spring-batch

  @Test
  public void testStepExecutionExitStatus() throws Exception {
    step.setJob(new JobSupport("child") {
      @Override
      public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
        execution.setStatus(BatchStatus.COMPLETED);
        execution.setExitStatus(new ExitStatus("CUSTOM"));
        execution.setEndTime(new Date());
      }
    });
    step.afterPropertiesSet();
    step.execute(stepExecution);
    assertEquals("CUSTOM", stepExecution.getExitStatus().getExitCode());
  }
}
origin: spring-projects/spring-batch

/**
 * Test method for
 * {@link org.springframework.batch.core.step.AbstractStep#execute(org.springframework.batch.core.StepExecution)}
 * .
 */
@Test
public void testExecuteSunnyDay() throws Exception {
  step.setJob(new JobSupport("child") {
    @Override
    public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
      execution.setStatus(BatchStatus.COMPLETED);
      execution.setEndTime(new Date());
    }
  });
  step.afterPropertiesSet();
  step.execute(stepExecution);
  assertEquals(BatchStatus.COMPLETED, stepExecution.getStatus());
  assertTrue("Missing job parameters in execution context: " + stepExecution.getExecutionContext(), stepExecution
      .getExecutionContext().containsKey(JobStep.class.getName() + ".JOB_PARAMETERS"));
}
origin: spring-projects/spring-batch

step.afterPropertiesSet();
origin: spring-projects/spring-batch

step.afterPropertiesSet();
step.execute(stepExecution);
assertEquals("FOO", stepExecution.getFailureExceptions().get(0).getMessage());
origin: spring-projects/spring-batch

@Test
public void testStoppedChild() throws Exception {
  DefaultJobParametersExtractor jobParametersExtractor = new DefaultJobParametersExtractor();
  jobParametersExtractor.setKeys(new String[] {"foo"});
  ExecutionContext executionContext = stepExecution.getExecutionContext();
  executionContext.put("foo", "bar");
  step.setJobParametersExtractor(jobParametersExtractor);
  step.setJob(new JobSupport("child") {
    @Override
    public void execute(JobExecution execution)  {
      assertEquals(1, execution.getJobParameters().getParameters().size());
      execution.setStatus(BatchStatus.STOPPED);
      execution.setEndTime(new Date());
      jobRepository.update(execution);
    }
    @Override
    public boolean isRestartable() {
      return true;
    }
  });
  step.afterPropertiesSet();
  step.execute(stepExecution);
  JobExecution jobExecution = stepExecution.getJobExecution();
  jobExecution.setEndTime(new Date());
  jobRepository.update(jobExecution);
  assertEquals(BatchStatus.STOPPED, stepExecution.getStatus());
}

origin: apache/servicemix-bundles

step.afterPropertiesSet();
origin: org.springframework.batch/spring-batch-core

step.afterPropertiesSet();
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

step.afterPropertiesSet();
org.springframework.batch.core.step.jobJobStepafterPropertiesSet

Popular methods of JobStep

  • setJob
    The Job to delegate to in this step.
  • setJobLauncher
    A JobLauncher is required to be able to run the enclosed Job.
  • setJobParametersExtractor
    The JobParametersExtractor is used to extract JobParametersExtractor from the StepExecution to run t
  • <init>
  • setName
  • determineStepExitStatus
    Determines the ExitStatus taking into consideration the ExitStatus from the StepExecution, which inv
  • execute
  • setJobRepository

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Collectors (java.util.stream)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now