Skip to content

Commit

Permalink
Moved test case to another test class
Browse files Browse the repository at this point in the history
  • Loading branch information
thobe committed Jun 8, 2011
1 parent cc80379 commit ff87954
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 49 deletions.

This file was deleted.

Expand Up @@ -294,6 +294,27 @@ public void indexDeleteShouldDeleteDirectory()
assertFalse( pathToLuceneIndex.exists() );
assertTrue( pathToOtherLuceneIndex.exists() );
}

@Test
public void canDeleteIndexEvenIfEntitiesAreFoundToBeAbandonedInTheSameTx()
{
// create and index a node
Index<Node> nodeIndex = graphDb.index().forNodes( "index" );
Node node = graphDb.createNode();
nodeIndex.add( node, "key", "value" );
// make sure to commit the creation of the entry
restartTx();

// delete the node to abandon the index entry
node.delete();
restartTx();

// iterate over all nodes indexed with the key to discover abandoned
for ( @SuppressWarnings( "unused" ) Node hit : nodeIndex.get( "key", "value" ) );

nodeIndex.delete();
restartTx();
}

private WorkThread createWorker()
{
Expand Down

0 comments on commit ff87954

Please sign in to comment.