Polish contribution

Closes gh-3831
This commit is contained in:
Stephane Nicoll 2015-09-02 16:52:31 +02:00
parent 560ffc9056
commit 1a60056f9e
2 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -59,6 +59,7 @@ import org.springframework.util.StringUtils;
* by providing a jobName
*
* @author Dave Syer
* @author Jean-Pierre Bergamin
*/
@Component
public class JobLauncherCommandLineRunner implements CommandLineRunner,

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,8 +16,6 @@
package org.springframework.boot.autoconfigure.batch;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.springframework.batch.core.Job;
@ -45,10 +43,13 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.transaction.PlatformTransactionManager;
import static org.junit.Assert.assertEquals;
/**
* Tests for {@link JobLauncherCommandLineRunner}.
*
* @author Dave Syer
* @author Jean-Pierre Bergamin
*/
public class JobLauncherCommandLineRunnerTests {
@ -136,9 +137,8 @@ public class JobLauncherCommandLineRunnerTests {
}).build()).incrementer(new RunIdIncrementer()).build();
this.runner.execute(this.job, new JobParameters());
this.runner.execute(this.job, new JobParameters());
/* A failed job that is not restartable does not re-use the job params of
* the last execution, but creates a new job instance when running it again.
*/
// A failed job that is not restartable does not re-use the job params of
// the last execution, but creates a new job instance when running it again.
assertEquals(2, this.jobExplorer.getJobInstances("job", 0, 100).size());
}