Skip to content

Commit

Permalink
Drop any left overs that are there before index population in the index
Browse files Browse the repository at this point in the history
directory
  • Loading branch information
MishaDemianenko committed Mar 27, 2018
1 parent 640d7e6 commit a540008
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class FusionIndexPopulator extends FusionIndexBase<IndexPopulator> implements In
@Override
public void create() throws IOException
{
dropAction.drop( indexId );
forAll( IndexPopulator::create, instances );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ public void createMustCreateAll() throws Exception
}
}

@Test
public void createRemoveAnyLeftOversThatWasThereInIndexDirectoryBeforePopulation() throws IOException
{
fusionIndexPopulator.create();

verify( dropAction ).drop( indexId );
}

@Test
public void createMustThrowIfAnyThrow() throws Exception
{
Expand Down

0 comments on commit a540008

Please sign in to comment.