Issue #3177: Fix CheckerTest#testDestroyCacheFileWithInvalidPath (Docker container: Ubuntu 14.04, Java 8, Maven 3)

This commit is contained in:
Andrei Selkin 2016-06-02 22:18:34 +03:00 committed by Roman Ivanov
parent 57c24460e7
commit 4b4e9f5d69
1 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,7 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.powermock.api.mockito.PowerMockito;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
@ -400,7 +401,8 @@ public class CheckerTest extends BaseCheckTestSupport {
checker.setCacheFile(file.getAbsolutePath());
}
else {
checker.setCacheFile(File.separator + ":invalid");
final int wrongFileNameLength = 300;
checker.setCacheFile(Strings.padEnd(File.separator, wrongFileNameLength, '*'));
}
try {
checker.destroy();