Package org.springframework.batch.core.explore

Examples of org.springframework.batch.core.explore.JobExplorer


    execution = jobLauncher
        .run(job, new JobParametersBuilder().addLong("run.id", (long) (Math.random() * Long.MAX_VALUE))
            .toJobParameters());
    assertEquals(status, execution.getStatus());
    assertEquals(stepExecutionCount, execution.getStepExecutions().size());
    JobExplorer jobExplorer = context.getBean(JobExplorer.class);
    assertEquals(1, jobExplorer.getJobInstanceCount(jobName));
    context.close();

  }
View Full Code Here


    job.afterPropertiesSet();

    jobLauncher.run(job, new JobParametersBuilder().addString("test", getClass().getName()).toJobParameters());

    Thread.sleep(500L);
    JobExplorer explorer = new MapJobExplorerFactoryBean(repositoryFactory).getObject();
    Set<JobExecution> executions = explorer.findRunningJobExecutions("job");
    assertEquals(1, executions.size());
    assertEquals(1, executions.iterator().next().getStepExecutions().size());

    block = false;
View Full Code Here

    repositoryFactory.getObject().createJobExecution("foo", new JobParameters());
   
    MapJobExplorerFactoryBean tested = new MapJobExplorerFactoryBean(repositoryFactory);
    tested.afterPropertiesSet();

    JobExplorer explorer = tested.getObject();

    assertEquals(1, explorer.findRunningJobExecutions("foo").size());

  }
View Full Code Here

  @Test
  public void testCreateExplorer() throws Exception {

    factory.afterPropertiesSet();
    JobExplorer explorer = factory.getObject();
    assertNotNull(explorer);

  }
View Full Code Here

    this.context = new AnnotationConfigApplicationContext();
    this.context.register(TestCustomConfiguration.class,
        BatchAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(JobLauncher.class));
    JobExplorer explorer = this.context.getBean(JobExplorer.class);
    assertNotNull(explorer);
    assertEquals(0, explorer.getJobInstances("job", 0, 100).size());
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.explore.JobExplorer

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.