mirror of https://github.com/apache/druid.git
Merge pull request #2809 from metamx/fix2694
Fix test for snapshot taker to better check for lookup perist failure
This commit is contained in:
parent
9440598685
commit
21e406613c
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
public class LookupSnapshotTaker
|
||||
{
|
||||
private static final Logger LOGGER = new Logger(LookupSnapshotTaker.class);
|
||||
private static final String PERSIST_FILE_NAME = "lookupSnapshot.json";
|
||||
protected static final String PERSIST_FILE_NAME = "lookupSnapshot.json";
|
||||
|
||||
private final ObjectMapper objectMapper;
|
||||
private final File persistDirectory;
|
||||
|
|
|
@ -73,7 +73,10 @@ public class LookupSnapshotTakerTest
|
|||
public void testIOExceptionDuringLookupPersist() throws IOException
|
||||
{
|
||||
File directory = temporaryFolder.newFolder();
|
||||
directory.setReadOnly();
|
||||
File snapshotFile = new File(directory, LookupSnapshotTaker.PERSIST_FILE_NAME);
|
||||
Assert.assertFalse(snapshotFile.exists());
|
||||
Assert.assertTrue(snapshotFile.createNewFile());
|
||||
Assert.assertTrue(snapshotFile.setReadOnly());
|
||||
LookupSnapshotTaker lookupSnapshotTaker = new LookupSnapshotTaker(mapper, directory.getAbsolutePath());
|
||||
LookupBean lookupBean = new LookupBean();
|
||||
lookupBean.name = "name";
|
||||
|
|
Loading…
Reference in New Issue