Skip to content

Commit

Permalink
Fixed bugs in KernelTransactionTestBase
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed Feb 17, 2016
1 parent 2863ef7 commit 3a6905d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -26,6 +26,7 @@
import org.neo4j.kernel.api.txstate.LegacyIndexTransactionState;
import org.neo4j.kernel.impl.api.KernelTransactionImplementation;
import org.neo4j.kernel.impl.api.KernelTransactions;
import org.neo4j.kernel.impl.api.SchemaWriteGuard;
import org.neo4j.kernel.impl.api.TransactionCommitProcess;
import org.neo4j.kernel.impl.api.TransactionHeaderInformation;
import org.neo4j.kernel.impl.api.TransactionHooks;
Expand Down Expand Up @@ -58,6 +59,7 @@ public class KernelTransactionTestBase
protected final CapturingCommitProcess commitProcess = new CapturingCommitProcess();
protected final TransactionHeaderInformation headerInformation = mock( TransactionHeaderInformation.class );
protected final TransactionHeaderInformationFactory headerInformationFactory = mock( TransactionHeaderInformationFactory.class );
protected final SchemaWriteGuard schemaWriteGuard = mock( SchemaWriteGuard.class );
protected final FakeClock clock = new FakeClock();
protected final KernelTransactions kernelTransactions = mock( KernelTransactions.class );

Expand All @@ -78,9 +80,9 @@ public KernelTransactionImplementation newTransaction()

public KernelTransactionImplementation newTransaction( long lastTransactionIdWhenStarted )
{
return new KernelTransactionImplementation( null, null, new NoOpClient(), hooks, null, null, headerInformationFactory,
commitProcess, transactionMonitor, legacyIndexState, kernelTransactions, clock, TransactionTracer.NULL,
storageEngine, lastTransactionIdWhenStarted );
return new KernelTransactionImplementation( null, schemaWriteGuard, new NoOpClient(), hooks, null, null,
headerInformationFactory, commitProcess, transactionMonitor, legacyIndexState, kernelTransactions,
clock, TransactionTracer.NULL, storageEngine, lastTransactionIdWhenStarted );
}

public class CapturingCommitProcess implements TransactionCommitProcess
Expand Down
Expand Up @@ -106,7 +106,7 @@ public void shouldAllowWritesInFullMode() throws Throwable
}

@Test
public void shoulAllowSchemaWriteAccessInFullMode() throws Throwable
public void shouldAllowSchemaWriteAccessInFullMode() throws Throwable
{
// Given
KernelTransactionImplementation tx = newTransaction();
Expand Down

0 comments on commit 3a6905d

Please sign in to comment.