SOLR-2739: more assumptions to ensure file is not writable

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1175975 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2011-09-26 18:05:25 +00:00
parent 74ebea2a3f
commit 4287d1bb52
1 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,10 @@ public class TestSqlEntityProcessorDelta extends AbstractDataImportHandlerTestCa
// execute the test only if we are able to set file to read only mode
assumeTrue("No dataimport.properties file", f.exists() || f.createNewFile());
assumeTrue("dataimport.proprties can't be set read only", f.setReadOnly());
assumeFalse("dataimport.proprties is still writable even though " +
"marked readonly - test running as superuser?", f.canWrite());
ignoreException("Properties is not writable");
List parentRow = new ArrayList();
parentRow.add(createMap("id", "1"));