Package org.springframework.batch.admin.web

Examples of org.springframework.batch.admin.web.StepExecutionInfo


  @Qualifier("jobs/executions/step")
  private View view;

  @Test
  public void testLaunchViewWithStepExecution() throws Exception {
    model.put("stepExecutionInfo", new StepExecutionInfo(MetaDataInstanceFactory.createStepExecution(), TimeZone
        .getTimeZone("GMT")));
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    assertTrue(content.contains("Details for Step Execution"));
View Full Code Here


  @Test
  public void testLaunchViewWithJobAndStepExecutionInfo() throws Exception {
    JobExecution jobExecution = MetaDataInstanceFactory.createJobExecutionWithStepExecutions(123L, Arrays.asList(
        "foo", "bar"));
    model.put("jobExecutionInfo", new JobExecutionInfo(jobExecution, TimeZone.getDefault()));
    model.put("stepExecutionInfos", Arrays.asList(new StepExecutionInfo(jobExecution.getStepExecutions().iterator()
        .next(), TimeZone.getTimeZone("GMT")), new StepExecutionInfo("job", 123L, "bar", TimeZone.getTimeZone("GMT"))));
    model.put("baseUrl", "http://localhost:8080/springsource");
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
    assertTrue(content.contains("\"duration\" : \"\""));
View Full Code Here

    StepExecution oldStepExecution = MetaDataInstanceFactory
        .createStepExecution();
    oldStepExecution.setEndTime(new Date());
    StepExecution stepExecution = MetaDataInstanceFactory
        .createStepExecution();
    model.put("stepExecutionInfo", new StepExecutionInfo(stepExecution,
        TimeZone.getTimeZone("GMT")));
    StepExecutionHistory stepExecutionHistory = new StepExecutionHistory(
        "step");
    stepExecutionHistory.append(oldStepExecution);
    model.put("stepExecutionHistory", stepExecutionHistory);
View Full Code Here

  @Qualifier("jobs/executions/step.json")
  private View view;

  @Test
  public void testLaunchViewWithJobExecutionInfo() throws Exception {
    model.put("stepExecutionInfo", new StepExecutionInfo(MetaDataInstanceFactory.createStepExecution(), TimeZone
        .getTimeZone("GMT")));
    model.put("baseUrl", "http://localhost:8080/springsource");
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
View Full Code Here

  public void testLaunchViewWithStackTrace() throws Exception {
    StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution();
    StringWriter description = new StringWriter();
    new RuntimeException("planned").printStackTrace(new PrintWriter(description));
    stepExecution.setExitStatus(ExitStatus.FAILED.addExitDescription(description.toString()));
    model.put("stepExecutionInfo", new StepExecutionInfo(stepExecution, TimeZone
        .getTimeZone("GMT")));
    model.put("baseUrl", "http://localhost:8080/springsource");
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
View Full Code Here

  @Test
  public void testLaunchViewWithJobExecution() throws Exception {
    JobExecution jobExecution = MetaDataInstanceFactory.createJobExecutionWithStepExecutions(123L, Arrays.asList(
        "foo", "bar"));
    model.put("jobExecutionInfo", new JobExecutionInfo(jobExecution, TimeZone.getTimeZone("GMT")));
    model.put("stepExecutionInfos", Arrays.asList(new StepExecutionInfo(jobExecution.getStepExecutions().iterator()
        .next(), TimeZone.getTimeZone("GMT")), new StepExecutionInfo("job", 123L, "bar", TimeZone.getTimeZone("GMT"))));
    model.put(BindingResult.MODEL_KEY_PREFIX + "stopRequest", new MapBindingResult(model, "stopRequest"));
    view.render(model, request, response);
    String content = response.getContentAsString();
    System.err.println(content);
    assertTrue(content.contains("Details for Job Execution"));
View Full Code Here

  private View view;

  @Test
  public void testLaunchViewWithStepExecutions() throws Exception {
    StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution();
    model.put("stepExecutions", Arrays.asList(new StepExecutionInfo(stepExecution, TimeZone.getTimeZone("GMT"))));
    model.put("jobExecutionInfo",
        new JobExecutionInfo(stepExecution.getJobExecution(), TimeZone.getTimeZone("GMT")));
    view.render(model, request, response);
    String content = response.getContentAsString();
    // System.err.println(content);
View Full Code Here

TOP

Related Classes of org.springframework.batch.admin.web.StepExecutionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.