Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ private boolean endOfArguments() {
// Prevent entry if nothing to do
@Override
public Sampler next() {
if (loopCount < getStartIndex()) {
loopCount = getStartIndex();
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you add a test case to cover the change?
It looks suspicious to call getStartIndex() twice as it might produce different results on every call.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Do you mean you want me to add a unit test about the change? I have only verified that this change can solve the problem. #6180
image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you mean you want me to add a unit test about the change?

Yeah. We need to add tests to prevent accidental regressions.
Here's a sample:

updateIterationIndex(getName(), loopCount);
try {
if (breakLoop || emptyList()) {
Expand Down