Skip to content

Commit

Permalink
Rewritten/removed tests that use JDI and breakpoints
Browse files Browse the repository at this point in the history
 * removed TestConcurrentRotation. it was supposed to verify that it is
   possible to load legacy index while rotating lucene transaction log.
   Currently we only have a single transaction log and rotation happens
   in a dedicated checkpointer thread concurrently with transactions.
   That is why this test does not seem to be relevant any more

 * TestPropertyReadOnNewEntityBeforeLockRelease rewritten in stochastic
   way to not use JDI and breakpoints

 * Removed breakpoints from IdGeneratorRebuildFailureEmulationTest.
   Breakpoint enabling annotations were just leftovers and not actually
   used.
  • Loading branch information
lutovich committed Oct 30, 2015
1 parent a8d2573 commit 0275570
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 356 deletions.
Expand Up @@ -51,8 +51,6 @@
import org.neo4j.logging.NullLogProvider;
import org.neo4j.test.ImpermanentGraphDatabase;
import org.neo4j.test.PageCacheRule;
import org.neo4j.test.subprocess.BreakpointTrigger;
import org.neo4j.test.subprocess.EnabledBreakpoints;
import org.neo4j.tooling.GlobalGraphOperations;

import static org.hamcrest.Matchers.startsWith;
Expand All @@ -75,10 +73,9 @@ protected void emulateFailureOnRebuildOf( NeoStores neoStores )
}
}

@BreakpointTrigger
private void performTest() throws Exception
private void performTest( String neostoreFileName ) throws Exception
{
File idFile = new File( storeDir, Thread.currentThread().getStackTrace()[2].getMethodName().replace( '_', '.' ) + ".id" );
File idFile = new File( storeDir, neostoreFileName + ".id" );
// emulate the need for rebuilding id generators by deleting it
fs.deleteFile( idFile );
NeoStores neoStores = null;
Expand Down Expand Up @@ -256,74 +253,64 @@ protected FileSystemAbstraction createFileSystemAbstraction()

}

@EnabledBreakpoints("performTest")
@Test
public void neostore() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_nodestore_db() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.NODE_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_propertystore_db_arrays() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.PROPERTY_ARRAYS_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_propertystore_db() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.PROPERTY_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_propertystore_db_index() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.PROPERTY_KEY_TOKEN_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_propertystore_db_index_keys() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.PROPERTY_KEY_TOKEN_NAMES_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_propertystore_db_strings() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.PROPERTY_STRINGS_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_relationshipstore_db() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.RELATIONSHIP_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_relationshiptypestore_db() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.RELATIONSHIP_TYPE_TOKEN_STORE_NAME );
}

@EnabledBreakpoints("performTest")
@Test
public void neostore_relationshiptypestore_db_names() throws Exception
{
performTest();
performTest( MetaDataStore.DEFAULT_NAME + StoreFactory.RELATIONSHIP_TYPE_TOKEN_NAMES_STORE_NAME );
}

private IdGeneratorRebuildFailureEmulationTest()
Expand Down

This file was deleted.

0 comments on commit 0275570

Please sign in to comment.