Skip to content

Commit

Permalink
Gather all native index provider tests under same umbrella
Browse files Browse the repository at this point in the history
  • Loading branch information
burqen committed Oct 3, 2018
1 parent 72a810f commit fe2003f
Show file tree
Hide file tree
Showing 9 changed files with 499 additions and 612 deletions.

This file was deleted.

Expand Up @@ -31,7 +31,6 @@
import org.neo4j.gis.spatial.index.curves.StandardConfiguration; import org.neo4j.gis.spatial.index.curves.StandardConfiguration;
import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.pagecache.PageCache; import org.neo4j.io.pagecache.PageCache;
import org.neo4j.kernel.api.index.IndexDirectoryStructure;
import org.neo4j.kernel.api.index.IndexProvider; import org.neo4j.kernel.api.index.IndexProvider;
import org.neo4j.kernel.api.schema.index.TestIndexDescriptorFactory; import org.neo4j.kernel.api.schema.index.TestIndexDescriptorFactory;
import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.configuration.Config;
Expand Down Expand Up @@ -111,29 +110,7 @@ private static PopulatorFactory<CompositeGenericKey,NativeIndexValue> genericPop
StandardConfiguration configuration = new StandardConfiguration(); StandardConfiguration configuration = new StandardConfiguration();
return ( pageCache, fs, storeFile, layout, monitor, descriptor ) -> return ( pageCache, fs, storeFile, layout, monitor, descriptor ) ->
new GenericNativeIndexPopulator( pageCache, fs, storeFile, layout, monitor, descriptor, spaceFillingCurveSettings, new GenericNativeIndexPopulator( pageCache, fs, storeFile, layout, monitor, descriptor, spaceFillingCurveSettings,
new SimpleDirectoryStructure( storeFile ), configuration, false ); SimpleIndexDirectoryStructures.onIndexFile( storeFile ), configuration, false );
}

private static class SimpleDirectoryStructure extends IndexDirectoryStructure
{
private final File indexFile;

SimpleDirectoryStructure( File indexFile )
{
this.indexFile = indexFile;
}

@Override
public File rootDirectory()
{
return indexFile.getParentFile();
}

@Override
public File directoryForIndex( long indexId )
{
return indexFile;
}
} }


@FunctionalInterface @FunctionalInterface
Expand Down

0 comments on commit fe2003f

Please sign in to comment.