Skip to content

Commit

Permalink
Fixed broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
fickludd committed Jan 30, 2017
1 parent 41a2c9f commit 967645a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -81,7 +81,7 @@ private void checkIndexToLabels( NodeRecord record,
List<PropertyBlock> properties = null;
for ( IndexRule indexRule : indexes.rules() )
{
int labelId = indexRule.getSchemaDescriptor().getLabelId();
long labelId = indexRule.getSchemaDescriptor().getLabelId();
if ( !labels.contains( labelId ) )
{
continue;
Expand Down
Expand Up @@ -65,6 +65,8 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.neo4j.helpers.collection.Iterators.asSet;
import static org.neo4j.kernel.impl.api.index.inmemory.InMemoryIndexProviderFactory.PROVIDER_DESCRIPTOR;

Expand Down Expand Up @@ -207,7 +209,7 @@ public void shouldThrowExceptionOnNodeDuplicateRuleFound()
TokenNameLookup tokenNameLookup = getDefaultTokenNameLookup();

SchemaStorage schemaStorageSpy = Mockito.spy( storage );
Mockito.when( schemaStorageSpy.loadAllSchemaRules() ).thenReturn(
Mockito.when( schemaStorageSpy.loadAllSchemaRules( any(), any(), anyBoolean() ) ).thenReturn(
Iterators.iterator(
getUniquePropertyConstraintRule( 1L, LABEL1, PROP1 ),
getUniquePropertyConstraintRule( 2L, LABEL1, PROP1 ) ) );
Expand Down Expand Up @@ -246,7 +248,7 @@ public void shouldThrowExceptionOnRelationshipDuplicateRuleFound()
TokenNameLookup tokenNameLookup = getDefaultTokenNameLookup();

SchemaStorage schemaStorageSpy = Mockito.spy( storage );
Mockito.when( schemaStorageSpy.loadAllSchemaRules() ).thenReturn(
Mockito.when( schemaStorageSpy.loadAllSchemaRules( any(), any(), anyBoolean() ) ).thenReturn(
Iterators.iterator(
getRelationshipPropertyExistenceConstraintRule( 1L, TYPE1, PROP1 ),
getRelationshipPropertyExistenceConstraintRule( 2L, TYPE1, PROP1 ) ) );
Expand Down

0 comments on commit 967645a

Please sign in to comment.