Ensure that no password was set by other tests, this breaks sometimes when the Sonar/Maven build runs all tests in one VM

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2015-10-29 09:30:11 +00:00
parent fa5fc2e65e
commit ba7f5f3037

View File

@ -28,6 +28,7 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.apache.poi.POIDataSamples; import org.apache.poi.POIDataSamples;
import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.junit.Assume; import org.junit.Assume;
import org.junit.Test; import org.junit.Test;
@ -82,6 +83,9 @@ public abstract class BaseXLSIteratingTest {
@Test @Test
public void testMain() throws Exception { public void testMain() throws Exception {
// we had intermittent problems when this was set differently somehow, let's try to set it here so it always is set correctly for these tests
Biff8EncryptionKey.setCurrentUserPassword(null);
try { try {
runOneFile(file); runOneFile(file);
} catch (Exception e) { } catch (Exception e) {