Skip to content

Commit

Permalink
Fix indexState
Browse files Browse the repository at this point in the history
  • Loading branch information
ragadeeshu committed Mar 13, 2017
1 parent 23656a2 commit bc01412
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -743,7 +743,7 @@ public InternalIndexState indexGetState( KernelStatement state, NewIndexDescript
}
}

return storeLayer.indexGetState( descriptor.schema() );
return storeLayer.indexGetState( descriptor );
}

@Override
Expand Down
Expand Up @@ -239,9 +239,9 @@ public long indexGetCommittedId( NewIndexDescriptor index )
}

@Override
public InternalIndexState indexGetState( LabelSchemaDescriptor descriptor ) throws IndexNotFoundKernelException
public InternalIndexState indexGetState( NewIndexDescriptor descriptor ) throws IndexNotFoundKernelException
{
return indexService.getIndexProxy( NewIndexDescriptorFactory.forSchema( descriptor ) ).getState();
return indexService.getIndexProxy( descriptor ).getState();
}

@Override
Expand Down
Expand Up @@ -151,7 +151,7 @@ long indexGetCommittedId( NewIndexDescriptor index )
* @return {@link InternalIndexState} for index.
* @throws IndexNotFoundKernelException if index not found.
*/
InternalIndexState indexGetState( LabelSchemaDescriptor descriptor ) throws IndexNotFoundKernelException;
InternalIndexState indexGetState( NewIndexDescriptor descriptor ) throws IndexNotFoundKernelException;

/**
* @param descriptor {@link LabelSchemaDescriptor} to get population progress for.
Expand Down
Expand Up @@ -86,7 +86,7 @@ public void before() throws Exception
state = StatementOperationsTestHelper.mockedState( txState );

store = mock( StoreReadLayer.class );
when( store.indexGetState( newIndexDescriptor.schema() ) ).thenReturn( InternalIndexState.ONLINE );
when( store.indexGetState( newIndexDescriptor ) ).thenReturn( InternalIndexState.ONLINE );
when( store.indexesGetForLabel( labelId ) ).then( answerAsIteratorFrom( indexes ) );
when( store.indexesGetAll() ).then( answerAsIteratorFrom( indexes ) );
when( store.constraintsGetForLabel( labelId ) ).thenReturn( Collections.emptyIterator() );
Expand Down

0 comments on commit bc01412

Please sign in to comment.