TestUtil.consumeTestData(): Make sure extractor doesn't use the position holder out of purpose.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=124335837
This commit is contained in:
parent
98b7e7f4e2
commit
80b10b5fc1
@ -84,6 +84,9 @@ public class TestUtil {
|
||||
int readResult = Extractor.RESULT_CONTINUE;
|
||||
while (readResult != Extractor.RESULT_END_OF_INPUT) {
|
||||
try {
|
||||
// Extractor.read should not read seekPositionHolder.position. Set it to a value that's
|
||||
// likely to cause test failure if a read does occur.
|
||||
seekPositionHolder.position = Long.MIN_VALUE;
|
||||
readResult = extractor.read(input, seekPositionHolder);
|
||||
if (readResult == Extractor.RESULT_SEEK) {
|
||||
long seekPosition = seekPositionHolder.position;
|
||||
|
Loading…
x
Reference in New Issue
Block a user