Skip to content

Commit

Permalink
Improved Names and testing after review.
Browse files Browse the repository at this point in the history
  • Loading branch information
eebus committed Feb 21, 2017
1 parent 9c987e5 commit c2688cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -27,7 +27,6 @@

import static org.neo4j.kernel.api.proc.Context.KERNEL_TRANSACTION;


public class ProcedureTransactionProvider implements ComponentRegistry.Provider<ProcedureTransaction>
{
@Override
Expand Down
Expand Up @@ -50,6 +50,8 @@ public interface ProcedureTransaction
* this method has been invoked, it doesn't matter if
* {@link Transaction#success()} is invoked afterwards -- the transaction will still be
* rolled back.
*
* This method is not thread safe.
*/
void failure();
}
Expand Up @@ -1130,7 +1130,7 @@ public void shouldMakeTransactionToFail() throws Throwable
{
db.createNode( Label.label( "Person" ) );
}
Result result = db.execute( "CALL org.neo4j.procedure.failure" );
Result result = db.execute( "CALL org.neo4j.procedure.failingPersonCount" );
//Then
exception.expect( TransactionFailureException.class );
result.next();
Expand All @@ -1145,7 +1145,6 @@ public void setUp() throws IOException
db = new TestGraphDatabaseFactory()
.newImpermanentDatabaseBuilder()
.setConfig( plugin_dir, plugins.getRoot().getAbsolutePath() )
.setConfig( procedure_unrestricted, "org.neo4j.procedure.*" )
.newGraphDatabase();
}

Expand Down Expand Up @@ -1302,7 +1301,7 @@ public Stream<Output> integrationTestMe()
}

@Procedure
public Stream<Output> failure()
public Stream<Output> failingPersonCount()
{
Result result = db.execute( "MATCH (n:Person) RETURN count(n) as count" );
procedureTransaction.failure();
Expand Down

0 comments on commit c2688cf

Please sign in to comment.