Search in sources :

Example 1 with ExtensionCallback

use of org.neo4j.test.extension.ExtensionCallback in project neo4j by neo4j.

the class DatabaseIT method configure.

@ExtensionCallback
void configure(TestDatabaseManagementServiceBuilder builder) {
    Dependencies dependencies = new Dependencies();
    pageCacheWrapper = new PageCacheWrapper(pageCacheExtension.getPageCache(fs));
    dependencies.satisfyDependency(pageCacheWrapper);
    builder.setInternalLogProvider(logProvider).setExternalDependencies(dependencies);
}
Also used : Dependencies(org.neo4j.collection.Dependencies) ExtensionCallback(org.neo4j.test.extension.ExtensionCallback)

Example 2 with ExtensionCallback

use of org.neo4j.test.extension.ExtensionCallback in project neo4j by neo4j.

the class StringLengthIndexValidationIT method configure.

@ExtensionCallback
void configure(TestDatabaseManagementServiceBuilder builder) {
    Monitors monitors = new Monitors();
    IndexingService.MonitorAdapter trappingMonitor = new IndexingService.MonitorAdapter() {

        @Override
        public void indexPopulationScanComplete() {
            if (trapPopulation.get()) {
                populationScanFinished.reached();
            }
        }
    };
    monitors.addMonitorListener(trappingMonitor);
    builder.setMonitors(monitors);
    builder.setConfig(default_schema_provider, schemaIndex.providerName());
}
Also used : IndexingService(org.neo4j.kernel.impl.api.index.IndexingService) Monitors(org.neo4j.monitoring.Monitors) ExtensionCallback(org.neo4j.test.extension.ExtensionCallback)

Example 3 with ExtensionCallback

use of org.neo4j.test.extension.ExtensionCallback in project neo4j by neo4j.

the class PropertyStoreTraceIT method configure.

@ExtensionCallback
void configure(TestDatabaseManagementServiceBuilder builder) {
    var dependencies = new Dependencies();
    // disabling periodic id buffers maintenance jobs
    dependencies.satisfyDependency(new CentralJobScheduler(Clocks.nanoClock()) {

        @Override
        public JobHandle<?> scheduleRecurring(Group group, JobMonitoringParams monitoredJobParams, Runnable runnable, long period, TimeUnit timeUnit) {
            return JobHandle.EMPTY;
        }

        @Override
        public JobHandle<?> scheduleRecurring(Group group, JobMonitoringParams monitoredJobParams, Runnable runnable, long initialDelay, long period, TimeUnit unit) {
            return JobHandle.EMPTY;
        }
    });
    builder.setExternalDependencies(dependencies);
}
Also used : Group(org.neo4j.scheduler.Group) JobHandle(org.neo4j.scheduler.JobHandle) TimeUnit(java.util.concurrent.TimeUnit) Dependencies(org.neo4j.collection.Dependencies) CentralJobScheduler(org.neo4j.kernel.impl.scheduler.CentralJobScheduler) JobMonitoringParams(org.neo4j.scheduler.JobMonitoringParams) ExtensionCallback(org.neo4j.test.extension.ExtensionCallback)

Example 4 with ExtensionCallback

use of org.neo4j.test.extension.ExtensionCallback in project neo4j by neo4j.

the class FulltextProceduresTestSupport method configure.

@ExtensionCallback
void configure(TestDatabaseManagementServiceBuilder builder) {
    Monitors monitors = new Monitors();
    IndexingService.MonitorAdapter trappingMonitor = new IndexingService.MonitorAdapter() {

        @Override
        public void indexPopulationScanComplete() {
            if (trapPopulation.get()) {
                populationScanFinished.reached();
            }
        }
    };
    monitors.addMonitorListener(trappingMonitor);
    builder.setMonitors(monitors);
    builder.setConfig(GraphDatabaseSettings.store_internal_log_level, Level.DEBUG);
}
Also used : IndexingService(org.neo4j.kernel.impl.api.index.IndexingService) Monitors(org.neo4j.monitoring.Monitors) ExtensionCallback(org.neo4j.test.extension.ExtensionCallback)

Example 5 with ExtensionCallback

use of org.neo4j.test.extension.ExtensionCallback in project neo4j by neo4j.

the class SchemaIndexWaitingAcceptanceTest method configure.

@ExtensionCallback
void configure(TestDatabaseManagementServiceBuilder builder) {
    List<ExtensionFactory<?>> extensions = Arrays.asList(singleInstanceIndexProviderFactory("test", provider), new TokenIndexProviderFactory());
    builder.setExtensions(extensions).noOpSystemGraphInitializer();
    builder.setConfig(default_schema_provider, provider.getProviderDescriptor().name());
}
Also used : ExtensionFactory(org.neo4j.kernel.extension.ExtensionFactory) TokenIndexProviderFactory(org.neo4j.kernel.impl.index.schema.TokenIndexProviderFactory) ExtensionCallback(org.neo4j.test.extension.ExtensionCallback)

Aggregations

ExtensionCallback (org.neo4j.test.extension.ExtensionCallback)6 IndexingService (org.neo4j.kernel.impl.api.index.IndexingService)3 Monitors (org.neo4j.monitoring.Monitors)3 Dependencies (org.neo4j.collection.Dependencies)2 TimeUnit (java.util.concurrent.TimeUnit)1 ExtensionFactory (org.neo4j.kernel.extension.ExtensionFactory)1 TokenIndexProviderFactory (org.neo4j.kernel.impl.index.schema.TokenIndexProviderFactory)1 CentralJobScheduler (org.neo4j.kernel.impl.scheduler.CentralJobScheduler)1 Group (org.neo4j.scheduler.Group)1 JobHandle (org.neo4j.scheduler.JobHandle)1 JobMonitoringParams (org.neo4j.scheduler.JobMonitoringParams)1