use of org.neo4j.logging.NullLogProvider in project neo4j by neo4j.
the class ExecutionEngineTests method shouldConvertListsAndMapsWhenPassingFromScalaToJava.
@Test
public void shouldConvertListsAndMapsWhenPassingFromScalaToJava() throws Exception {
GraphDatabaseQueryService graph = new GraphDatabaseCypherService(this.database.getGraphDatabaseAPI());
KernelAPI kernelAPI = graph.getDependencyResolver().resolveDependency(KernelAPI.class);
Monitors monitors = graph.getDependencyResolver().resolveDependency(Monitors.class);
NullLogProvider nullLogProvider = NullLogProvider.getInstance();
CommunityCompatibilityFactory compatibilityFactory = new CommunityCompatibilityFactory(graph, kernelAPI, monitors, nullLogProvider);
ExecutionEngine executionEngine = new ExecutionEngine(graph, nullLogProvider, compatibilityFactory);
Result result;
try (InternalTransaction tx = graph.beginTransaction(KernelTransaction.Type.implicit, SecurityContext.AUTH_DISABLED)) {
String query = "RETURN { key : 'Value' , collectionKey: [{ inner: 'Map1' }, { inner: 'Map2' }]}";
TransactionalContext tc = createTransactionContext(graph, tx, query);
result = executionEngine.executeQuery(query, NO_PARAMS, tc);
tx.success();
}
Map firstRowValue = (Map) result.next().values().iterator().next();
assertThat(firstRowValue.get("key"), is("Value"));
List theList = (List) firstRowValue.get("collectionKey");
assertThat(((Map) theList.get(0)).get("inner"), is("Map1"));
assertThat(((Map) theList.get(1)).get("inner"), is("Map2"));
}
use of org.neo4j.logging.NullLogProvider in project neo4j by neo4j.
the class RsdrMain method openStore.
private static StoreFactory openStore(FileSystemAbstraction fileSystem, File storeDir, Config config, PageCache pageCache) {
IdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fileSystem);
NullLogProvider logProvider = NullLogProvider.getInstance();
return new StoreFactory(storeDir, config, idGeneratorFactory, pageCache, fileSystem, logProvider);
}
use of org.neo4j.logging.NullLogProvider in project neo4j by neo4j.
the class ComparableRaftStateTest method twoIdenticalStatesShouldBeEqual.
@Test
public void twoIdenticalStatesShouldBeEqual() throws Exception {
// given
NullLogProvider logProvider = NullLogProvider.getInstance();
ComparableRaftState state1 = new ComparableRaftState(member(0), asSet(member(0), member(1), member(2)), asSet(member(0), member(1), member(2)), new InMemoryRaftLog(), new InFlightMap<>(), logProvider);
ComparableRaftState state2 = new ComparableRaftState(member(0), asSet(member(0), member(1), member(2)), asSet(member(0), member(1), member(2)), new InMemoryRaftLog(), new InFlightMap<>(), logProvider);
// then
assertEquals(state1, state2);
}
use of org.neo4j.logging.NullLogProvider in project neo4j by neo4j.
the class LuceneSchemaIndexProviderCompatibilitySuiteTest method createIndexProvider.
@Override
protected LuceneSchemaIndexProvider createIndexProvider(FileSystemAbstraction fs, File graphDbDir) {
DirectoryFactory.InMemoryDirectoryFactory directoryFactory = new DirectoryFactory.InMemoryDirectoryFactory();
NullLogProvider logging = NullLogProvider.getInstance();
Config config = Config.defaults();
OperationalMode mode = OperationalMode.single;
return new LuceneSchemaIndexProvider(fs, directoryFactory, graphDbDir, logging, config, mode);
}
Aggregations