Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Added test for Issue #18 that verifies each partition gets its own PUD #63

Merged
merged 1 commit into from
Sep 29, 2016
Merged

Added test for Issue #18 that verifies each partition gets its own PUD #63

merged 1 commit into from
Sep 29, 2016

Conversation

jvfullam
Copy link

No description provided.

},
apiRefs = { @APIRef(className="javax.batch.runtime.context.StepContext", methodNames={"setPersistentUserData", "getPersistentUserData"}) },
issueRefs = {"https://github.com/WASdev/standards.jsr352.tck/issues/18"},
strategy = "See comments in the code for this test"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious.. did you just thing it reads better visually or was it all the backslashing that steered you to doing it this way?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last discussion we had about the annotations was that we should make them smaller, and that the test strategy aka implementation details don't need to show up in the TCK test coverage report


PUDString = "PUD for Partition: " +partitionNumber;
stepCtx.setPersistentUserData(PUDString);

Copy link
Member

@scottkurz scottkurz Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initializing the PUDString in open() assures partitionNumber will have been injected. But if you're going to set it on the restart too it renders the later check not as interesting. You probably want to guard the set with if (checkpoint==null) {

}
}

//Code below is take from BasicReader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe encapsulate all in another method... not essential, just a thought.

if (checkpoint == null) {
stepCtx.setPersistentUserData(PUDString);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this since if you're going to set it every time doesn't it render the check in readItem() less interesting in exec #2?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a dup of the previous comment which I thought had been lost.

@jvfullam jvfullam changed the title Added test for Issue #18 that verifies each partition gets it's own PUD Added test for Issue #18 that verifies each partition gets its own PUD Sep 29, 2016
@scottkurz scottkurz merged commit dbed125 into WASdev:master Sep 29, 2016
@jvfullam jvfullam deleted the issue#18 branch September 30, 2016 15:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants