Skip to content

Commit

Permalink
Remove duplicate of NodeTransactionStateTestBase.shouldSeeLabelChange…
Browse files Browse the repository at this point in the history
…sInTransaction
  • Loading branch information
fickludd committed Apr 17, 2018
1 parent 0bf44d6 commit 3669bd9
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@

import org.neo4j.internal.kernel.api.NamedToken;
import org.neo4j.internal.kernel.api.Transaction;
import org.neo4j.internal.kernel.api.Write;
import org.neo4j.kernel.api.security.AnonymousContext;

import static org.hamcrest.core.IsCollectionContaining.hasItems;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.neo4j.helpers.collection.Iterators.asCollection;

public class LabelIT extends KernelIntegrationTest
Expand Down Expand Up @@ -61,28 +59,4 @@ public void shouldListAllLabels() throws Exception
hasItems( new NamedToken( "label1", label1Id ), new NamedToken( "label2", label2Id ) ) );
commit();
}

@Test
public void addingAndRemovingLabelInSameTxShouldHaveNoEffect() throws Exception
{
// Given a node with a label
Transaction transaction = newTransaction( AnonymousContext.writeToken() );
int label = transaction.tokenWrite().labelGetOrCreateForName( "Label 1" );
long node = transaction.dataWrite().nodeCreate();
transaction.dataWrite().nodeAddLabel( node, label );
commit();

// When I add and remove that label in the same tx
Write write = dataWriteInNewTransaction();
write.nodeRemoveLabel( node, label );
write.nodeAddLabel( node, label );

// Then commit should not throw exceptions
commit();

// And then the node should have the label

assertTrue( nodeHasLabel( newTransaction(), node, label ) );
commit();
}
}

0 comments on commit 3669bd9

Please sign in to comment.