fix test : the condition in the while loop is not right.
Merge pull request #1459 from clebertsuconic/2.3.x

fix test : the condition in the while loop is not right.