diff --git a/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/BuiltInProcedures.java b/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/BuiltInProcedures.java index 88f0a0823c5e7..072b0fc73caae 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/BuiltInProcedures.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/BuiltInProcedures.java @@ -54,22 +54,22 @@ public class BuiltInProcedures @Context public KernelTransaction tx; - @Description("List all labels in the database.") - @Procedure(name = "db.labels", mode = READ) + @Description( "List all labels in the database." ) + @Procedure( name = "db.labels", mode = READ ) public Stream listLabels() { return TokenAccess.LABELS.inUse( tx.acquireStatement() ).map( LabelResult::new ).stream(); } @Description( "List all property keys in the database." ) - @Procedure(name = "db.propertyKeys", mode = READ) + @Procedure( name = "db.propertyKeys", mode = READ ) public Stream listPropertyKeys() { return TokenAccess.PROPERTY_KEYS.inUse( tx.acquireStatement() ).map( PropertyKeyResult::new ).stream(); } @Description( "List all relationship types in the database." ) - @Procedure(name = "db.relationshipTypes", mode = READ) + @Procedure( name = "db.relationshipTypes", mode = READ ) public Stream listRelationshipTypes() { return TokenAccess.RELATIONSHIP_TYPES.inUse( tx.acquireStatement() ) @@ -77,7 +77,7 @@ public Stream listRelationshipTypes() } @Description( "List all indexes in the database." ) - @Procedure(name = "db.indexes", mode = READ) + @Procedure( name = "db.indexes", mode = READ ) public Stream listIndexes() throws ProcedureException { try ( Statement statement = tx.acquireStatement() ) @@ -120,21 +120,21 @@ public Stream listIndexes() throws ProcedureException } } - @Description("Await indexes in the database to come online.") - @Procedure(name = "db.awaitIndex", mode = READ) - public void awaitIndex( @Name("label") String labelName, - @Name("property") String propertyKeyName, - @Name(value = "timeOutSeconds", defaultValue = "300") long timeout ) + @Description( "Wait for an index to come online." ) + @Procedure( name = "db.awaitIndex", mode = READ ) + public void awaitIndex( @Name( "label" ) String labelName, + @Name( "property" ) String propertyKeyName, + @Name( value = "timeOutSeconds", defaultValue = "300" ) long timeout ) throws ProcedureException { - try ( AwaitIndexProcedure awaitIndexProcedure = new AwaitIndexProcedure( tx ) ) + try ( IndexProcedures indexProcedures = indexProcedures() ) { - awaitIndexProcedure.execute( labelName, propertyKeyName, timeout, TimeUnit.SECONDS ); + indexProcedures.awaitIndex( labelName, propertyKeyName, timeout, TimeUnit.SECONDS ); } } @Description( "List all constraints in the database." ) - @Procedure(name = "db.constraints", mode = READ) + @Procedure( name = "db.constraints", mode = READ ) public Stream listConstraints() { Statement statement = tx.acquireStatement(); @@ -150,7 +150,7 @@ public Stream listConstraints() } @Description( "List all procedures in the DBMS." ) - @Procedure(name = "dbms.procedures", mode = READ) + @Procedure( name = "dbms.procedures", mode = READ ) public Stream listProcedures() { try ( Statement statement = tx.acquireStatement() ) @@ -175,6 +175,11 @@ public Stream listFunctions() } } + private IndexProcedures indexProcedures() + { + return new IndexProcedures( tx ); + } + @SuppressWarnings( "unused" ) public class LabelResult { diff --git a/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedure.java b/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/IndexProcedures.java similarity index 95% rename from community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedure.java rename to community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/IndexProcedures.java index b599ae404aa2d..15c4f6b8f74bf 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedure.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/builtinprocs/IndexProcedures.java @@ -35,18 +35,18 @@ import static java.lang.String.format; -public class AwaitIndexProcedure implements AutoCloseable +public class IndexProcedures implements AutoCloseable { + private final Statement statement; private final ReadOperations operations; - private Statement statement; - public AwaitIndexProcedure( KernelTransaction tx ) + public IndexProcedures( KernelTransaction tx ) { statement = tx.acquireStatement(); operations = statement.readOperations(); } - public void execute( String labelName, String propertyKeyName, long timeout, TimeUnit timeoutUnits ) + public void awaitIndex( String labelName, String propertyKeyName, long timeout, TimeUnit timeoutUnits ) throws ProcedureException { int labelId = getLabelId( labelName ); diff --git a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedureTest.java b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedureTest.java index 151f5fc99bd8a..1a26f1c423203 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedureTest.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/AwaitIndexProcedureTest.java @@ -19,32 +19,22 @@ */ package org.neo4j.kernel.builtinprocs; -import org.junit.Test; -import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; - import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import org.neo4j.kernel.api.DataWriteOperations; -import org.neo4j.kernel.api.KernelTransaction; -import org.neo4j.kernel.api.QueryRegistryOperations; +import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + import org.neo4j.kernel.api.ReadOperations; -import org.neo4j.kernel.api.SchemaWriteOperations; -import org.neo4j.kernel.api.Statement; -import org.neo4j.kernel.api.TokenWriteOperations; -import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException; import org.neo4j.kernel.api.exceptions.ProcedureException; import org.neo4j.kernel.api.exceptions.Status; -import org.neo4j.kernel.api.exceptions.TransactionFailureException; import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException; import org.neo4j.kernel.api.exceptions.schema.IndexSchemaRuleNotFoundException; import org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException; import org.neo4j.kernel.api.index.IndexDescriptor; import org.neo4j.kernel.api.index.InternalIndexState; -import org.neo4j.kernel.api.security.AccessMode; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; @@ -57,6 +47,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; + import static org.neo4j.kernel.api.index.InternalIndexState.FAILED; import static org.neo4j.kernel.api.index.InternalIndexState.ONLINE; import static org.neo4j.kernel.api.index.InternalIndexState.POPULATING; @@ -67,20 +58,7 @@ public class AwaitIndexProcedureTest private static final int timeout = 40; private static final TimeUnit timeoutUnits = TimeUnit.MILLISECONDS; private final ReadOperations operations = mock( ReadOperations.class ); - private final AwaitIndexProcedure procedure = new AwaitIndexProcedure( new StubKernelTransaction( operations ) ); - - @Test - public void closeStatementOnClose() throws Exception - { - KernelTransaction kernelTransaction = Mockito.mock( KernelTransaction.class ); - Statement statement = mock( Statement.class ); - when( kernelTransaction.acquireStatement() ).thenReturn( statement ); - try ( AwaitIndexProcedure ignored = new AwaitIndexProcedure( kernelTransaction ) ) - { - //empty - } - verify( statement ).close(); - } + private final IndexProcedures procedure = new IndexProcedures( new StubKernelTransaction( operations ) ); @Test public void shouldThrowAnExceptionIfTheLabelDoesntExist() throws ProcedureException @@ -89,7 +67,7 @@ public void shouldThrowAnExceptionIfTheLabelDoesntExist() throws ProcedureExcept try { - procedure.execute( "non-existent-label", null, timeout, timeoutUnits ); + procedure.awaitIndex( "non-existent-label", null, timeout, timeoutUnits ); fail( "Expected an exception" ); } catch ( ProcedureException e ) @@ -105,7 +83,7 @@ public void shouldThrowAnExceptionIfThePropertyKeyDoesntExist() throws Procedure try { - procedure.execute( null, "non-existent-property-key", timeout, timeoutUnits ); + procedure.awaitIndex( null, "non-existent-property-key", timeout, timeoutUnits ); fail( "Expected an exception" ); } catch ( ProcedureException e ) @@ -124,7 +102,7 @@ public void shouldLookUpTheIndexByLabelIdAndPropertyKeyId() .thenReturn( new IndexDescriptor( 0, 0 ) ); when( operations.indexGetState( any( IndexDescriptor.class ) ) ).thenReturn( ONLINE ); - procedure.execute( null, null, timeout, timeoutUnits ); + procedure.awaitIndex( null, null, timeout, timeoutUnits ); verify( operations ).indexGetForLabelAndPropertyKey( 123, 456 ); } @@ -142,7 +120,7 @@ public void shouldThrowAnExceptionIfTheIndexHasFailed() try { - procedure.execute( null, null, timeout, timeoutUnits ); + procedure.awaitIndex( null, null, timeout, timeoutUnits ); fail( "Expected an exception" ); } catch ( ProcedureException e ) @@ -158,13 +136,12 @@ public void shouldThrowAnExceptionIfTheIndexDoesNotExist() { when( operations.labelGetForName( anyString() ) ).thenReturn( 0 ); when( operations.propertyKeyGetForName( anyString() ) ).thenReturn( 0 ); - //noinspection unchecked when( operations.indexGetForLabelAndPropertyKey( anyInt(), anyInt() ) ) .thenThrow( new IndexSchemaRuleNotFoundException( -1, -1 ) ); try { - procedure.execute( null, null, timeout, timeoutUnits ); + procedure.awaitIndex( null, null, timeout, timeoutUnits ); fail( "Expected an exception" ); } catch ( ProcedureException e ) @@ -197,7 +174,7 @@ public InternalIndexState answer( InvocationOnMock invocationOnMock ) throws Thr { try { - procedure.execute( null, null, timeout, timeoutUnits ); + procedure.awaitIndex( null, null, timeout, timeoutUnits ); } catch ( ProcedureException e ) { @@ -228,7 +205,7 @@ public void shouldTimeoutIfTheIndexTakesTooLongToComeOnline() { try { - procedure.execute( null, null, timeout, timeoutUnits ); + procedure.awaitIndex( null, null, timeout, timeoutUnits ); } catch ( ProcedureException e ) { @@ -240,162 +217,4 @@ public void shouldTimeoutIfTheIndexTakesTooLongToComeOnline() //noinspection ThrowableResultOfMethodCallIgnored assertThat( exception.get().status(), is( Status.Procedure.ProcedureTimedOut ) ); } - - private class StubKernelTransaction implements KernelTransaction - { - private final ReadOperations readOperations; - - StubKernelTransaction( ReadOperations readOperations ) - { - this.readOperations = readOperations; - } - - @Override - public Statement acquireStatement() - { - return new StubStatement( readOperations ); - } - - @Override - public void success() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public void failure() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long closeTransaction() throws TransactionFailureException - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public boolean isOpen() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public AccessMode mode() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public Status getReasonIfTerminated() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public void markForTermination( Status reason ) - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long lastTransactionTimestampWhenStarted() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long lastTransactionIdWhenStarted() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long startTime() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long timeout() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public void registerCloseListener( CloseListener listener ) - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public Type transactionType() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long getTransactionId() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public long getCommitTime() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public Revertable overrideWith( AccessMode mode ) - { - throw new UnsupportedOperationException( "not implemented" ); - } - } - - private class StubStatement implements Statement - { - private final ReadOperations readOperations; - - StubStatement( ReadOperations readOperations ) - { - this.readOperations = readOperations; - } - - @Override - public void close() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public ReadOperations readOperations() - { - return readOperations; - } - - @Override - public TokenWriteOperations tokenWriteOperations() - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public DataWriteOperations dataWriteOperations() throws InvalidTransactionTypeKernelException - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public SchemaWriteOperations schemaWriteOperations() throws InvalidTransactionTypeKernelException - { - throw new UnsupportedOperationException( "not implemented" ); - } - - @Override - public QueryRegistryOperations queryRegistration() - { - throw new UnsupportedOperationException( "not implemented" ); - } - } } diff --git a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/BuiltInProceduresTest.java b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/BuiltInProceduresTest.java index 6d1710839efaa..678efabde554c 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/BuiltInProceduresTest.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/BuiltInProceduresTest.java @@ -19,17 +19,17 @@ */ package org.neo4j.kernel.builtinprocs; -import org.hamcrest.Matcher; -import org.junit.Before; -import org.junit.Test; -import org.mockito.stubbing.Answer; - import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; +import org.hamcrest.Matcher; +import org.junit.Before; +import org.junit.Test; +import org.mockito.stubbing.Answer; + import org.neo4j.helpers.collection.Iterators; import org.neo4j.kernel.api.KernelTransaction; import org.neo4j.kernel.api.ReadOperations; @@ -48,6 +48,7 @@ import static java.util.Collections.emptyIterator; import static java.util.Collections.singletonList; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; @@ -56,6 +57,7 @@ import static org.mockito.Matchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; + import static org.neo4j.kernel.api.proc.Context.KERNEL_TRANSACTION; public class BuiltInProceduresTest @@ -168,7 +170,7 @@ public void shouldListCorrectBuiltinProcedures() throws Throwable { // When/Then assertThat( call( "dbms.procedures" ), containsInAnyOrder( - record( "db.awaitIndex", "db.awaitIndex(label :: STRING?, property :: STRING?, timeOutSeconds = 300 :: INTEGER?) :: VOID", "Await indexes in the database to come online." ), + record( "db.awaitIndex", "db.awaitIndex(label :: STRING?, property :: STRING?, timeOutSeconds = 300 :: INTEGER?) :: VOID", "Wait for an index to come online." ), record( "db.constraints", "db.constraints() :: (description :: STRING?)", "List all constraints in the database." ), record( "db.indexes", "db.indexes() :: (description :: STRING?, state :: STRING?, type :: STRING?)", "List all indexes in the database." ), record( "db.labels", "db.labels() :: (label :: STRING?)", "List all labels in the database." ), diff --git a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/IndexProceduresTest.java b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/IndexProceduresTest.java new file mode 100644 index 0000000000000..eaabb11b46ace --- /dev/null +++ b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/IndexProceduresTest.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2016 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.kernel.builtinprocs; + +import org.junit.Test; + +import org.neo4j.kernel.api.KernelTransaction; +import org.neo4j.kernel.api.Statement; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +public class IndexProceduresTest +{ + @Test + public void closeStatementOnClose() throws Exception + { + KernelTransaction kernelTransaction = mock( KernelTransaction.class ); + Statement statement = mock( Statement.class ); + when( kernelTransaction.acquireStatement() ).thenReturn( statement ); + //noinspection EmptyTryBlock + try ( IndexProcedures ignored = new IndexProcedures( kernelTransaction ) ) + { + } + verify( statement ).close(); + } +} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/StubKernelTransaction.java b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/StubKernelTransaction.java new file mode 100644 index 0000000000000..4ed5f10f563d5 --- /dev/null +++ b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/StubKernelTransaction.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2002-2016 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.kernel.builtinprocs; + +import org.neo4j.kernel.api.KernelTransaction; +import org.neo4j.kernel.api.ReadOperations; +import org.neo4j.kernel.api.Statement; +import org.neo4j.kernel.api.exceptions.Status; +import org.neo4j.kernel.api.exceptions.TransactionFailureException; +import org.neo4j.kernel.api.security.AccessMode; + +public class StubKernelTransaction implements KernelTransaction +{ + private final ReadOperations readOperations; + + StubKernelTransaction( ReadOperations readOperations ) + { + this.readOperations = readOperations; + } + + @Override + public Statement acquireStatement() + { + return new StubStatement( readOperations ); + } + + @Override + public void success() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public void failure() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long closeTransaction() throws TransactionFailureException + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public boolean isOpen() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public AccessMode mode() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public Status getReasonIfTerminated() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public void markForTermination( Status reason ) + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long lastTransactionTimestampWhenStarted() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long lastTransactionIdWhenStarted() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long startTime() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long timeout() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public void registerCloseListener( CloseListener listener ) + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public Type transactionType() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long getTransactionId() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public long getCommitTime() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public Revertable overrideWith( AccessMode mode ) + { + throw new UnsupportedOperationException( "not implemented" ); + } +} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/StubStatement.java b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/StubStatement.java new file mode 100644 index 0000000000000..0147f2e940e49 --- /dev/null +++ b/community/kernel/src/test/java/org/neo4j/kernel/builtinprocs/StubStatement.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2016 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.kernel.builtinprocs; + +import org.neo4j.kernel.api.DataWriteOperations; +import org.neo4j.kernel.api.QueryRegistryOperations; +import org.neo4j.kernel.api.ReadOperations; +import org.neo4j.kernel.api.SchemaWriteOperations; +import org.neo4j.kernel.api.Statement; +import org.neo4j.kernel.api.TokenWriteOperations; +import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException; + +public class StubStatement implements Statement +{ + private final ReadOperations readOperations; + + StubStatement( ReadOperations readOperations ) + { + this.readOperations = readOperations; + } + + @Override + public void close() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public ReadOperations readOperations() + { + return readOperations; + } + + @Override + public TokenWriteOperations tokenWriteOperations() + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public DataWriteOperations dataWriteOperations() throws InvalidTransactionTypeKernelException + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public SchemaWriteOperations schemaWriteOperations() throws InvalidTransactionTypeKernelException + { + throw new UnsupportedOperationException( "not implemented" ); + } + + @Override + public QueryRegistryOperations queryRegistration() + { + throw new UnsupportedOperationException( "not implemented" ); + } +} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/api/integrationtest/BuiltInProceduresIT.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/api/integrationtest/BuiltInProceduresIT.java index 28d853e5fa6c6..bda3a1790a75f 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/api/integrationtest/BuiltInProceduresIT.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/api/integrationtest/BuiltInProceduresIT.java @@ -108,7 +108,7 @@ public void listProcedures() throws Throwable equalTo( new Object[]{"db.constraints", "db.constraints() :: (description :: STRING?)", "List all constraints in the database."} ), equalTo( new Object[]{"db.indexes", "db.indexes() :: (description :: STRING?, state :: STRING?, type :: STRING?)", "List all indexes in the database."} ), equalTo( new Object[]{"db.awaitIndex", "db.awaitIndex(label :: STRING?, property :: STRING?, " + - "timeOutSeconds = 300 :: INTEGER?) :: VOID", "Await indexes in the database to come online."} ), + "timeOutSeconds = 300 :: INTEGER?) :: VOID", "Wait for an index to come online."} ), equalTo( new Object[]{"db.propertyKeys", "db.propertyKeys() :: (propertyKey :: STRING?)", "List all property keys in the database."} ), equalTo( new Object[]{"db.labels", "db.labels() :: (label :: STRING?)", "List all labels in the database."} ), equalTo( new Object[]{"db.relationshipTypes", "db.relationshipTypes() :: (relationshipType :: " +