RESOLVED - issue BATCH-446: taskCount in StepExecution should be itemCount

http://jira.springframework.org/browse/BATCH-446
This commit is contained in:
robokaso
2008-03-12 09:27:55 +00:00
parent 0e5f7f11c3
commit bde4cea8a7
14 changed files with 61 additions and 61 deletions

View File

@@ -117,9 +117,9 @@ public class StepExecutionTests extends TestCase {
* {@link org.springframework.batch.core.StepExecution#incrementTaskCount()}.
*/
public void testIncrementLuwCount() {
int before = execution.getTaskCount().intValue();
int before = execution.getItemCount().intValue();
execution.incrementTaskCount();
int after = execution.getTaskCount().intValue();
int after = execution.getItemCount().intValue();
assertEquals(before + 1, after);
}
@@ -145,11 +145,11 @@ public class StepExecutionTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.core.StepExecution#getTaskCount()}.
* {@link org.springframework.batch.core.StepExecution#getItemCount()}.
*/
public void testGetTaskCount() {
execution.setTaskCount(123);
assertEquals(123, execution.getTaskCount().intValue());
execution.setItemCount(123);
assertEquals(123, execution.getItemCount().intValue());
}
/**
@@ -184,8 +184,8 @@ public class StepExecutionTests extends TestCase {
}
public void testToString() throws Exception {
assertTrue("Should contain task count: " + execution.toString(),
execution.toString().indexOf("task") >= 0);
assertTrue("Should contain item count: " + execution.toString(),
execution.toString().indexOf("item") >= 0);
assertTrue("Should contain commit count: " + execution.toString(),
execution.toString().indexOf("commit") >= 0);
assertTrue("Should contain rollback count: " + execution.toString(),

View File

@@ -161,7 +161,7 @@ public abstract class AbstractStepDaoTests extends AbstractTransactionalDataSour
stepExecution.setStatus(BatchStatus.COMPLETED);
stepExecution.setEndTime(new Date(System.currentTimeMillis()));
stepExecution.setCommitCount(5);
stepExecution.setTaskCount(5);
stepExecution.setItemCount(5);
stepExecution.setExecutionContext(new ExecutionContext());
stepExecution.setExitStatus(new ExitStatus(false, ExitStatusExceptionClassifier.FATAL_EXCEPTION,
"java.lang.Exception"));

View File

@@ -120,7 +120,7 @@ public class ItemOrientedStepTests extends TestCase {
itemOrientedStep.execute(stepExecution);
assertEquals(1, processed.size());
assertEquals(1, stepExecution.getTaskCount().intValue());
assertEquals(1, stepExecution.getItemCount().intValue());
}
public void testChunkExecutor() throws Exception {
@@ -137,7 +137,7 @@ public class ItemOrientedStepTests extends TestCase {
StepContribution contribution = stepExecution.createStepContribution();
itemOrientedStep.processChunk(contribution);
assertEquals(1, processed.size());
assertEquals(0, stepExecution.getTaskCount().intValue());
assertEquals(0, stepExecution.getItemCount().intValue());
assertEquals(1, contribution.getTaskCount());
}