Package: com.ibm.jbatch.tck.tests.jslxml
Class: ParallelContextPropagationTests

testPartitionContextPropagation

Test introduced in TCK Version: 1.1.WORKING

Test Assertion(s)

Assertion(s)
The values of JobContext and StepContext can be accessed from an artifact running in a partition.

Jakarta Batch Reference(s)

Section Version Citation(s) Note(s)
10.9.1 1.0 ~ API for JobContext
10.9.2 1.0 ~ API for StepContext

API Reference(s)

Class Name Method Names Note(s)
jakarta.batch.runtime.context.JobContext ~ getProperties
~ getJobName
~ getExecutionId
~ getInstanceId
jakarta.batch.runtime.context.StepContext ~ getStepExecutionId
~ getProperties

Issue Reference(s)

Link(s)
https://java.net/bugzilla/show_bug.cgi?id=5164

Test Strategy

Strategy
First, certain JobContext and StepContext values (properties, names, ids, etc.) are checked against hard-coded values within the executing batchlet. Then, a PartitionCollector formats some of the values into a String, which is passed to a PartitionAnalyzer. The PartitionAnalyzer sets the job exit status to this formatted String. Finally, we check that the values obtained by parsing the job exit status correspond with the values obtained from the JobExecution and StepExecution.

Additional Comments

Comment(s)
There is no particular place in the spec that says that partitions share the same values for the getters tested as the top-level JobContext/StepContext.