tempDir.mkdirs();
}
private static PluginContainerConfiguration createDefaultPluginConfiguration(PluginContainerSetup setup,
Mockery context) {
PluginContainerConfiguration conf = new PluginContainerConfiguration();
File tmpDir = createTemporaryDirectory(setup);
conf.setPluginDirectory(new File(tmpDir, PLUGINS_DIR_NAME));
conf.setDataDirectory(new File(tmpDir, DATA_DIR_NAME));
conf.setTemporaryDirectory(new File(tmpDir, TMP_DIR_NAME));
conf.setInsideAgent(setup.inAgent());
conf.setPluginFinder(new FileSystemPluginFinder(conf.getPluginDirectory()));
conf.setCreateResourceClassloaders(false);
//we're not interested in any scans happening out of our control
conf.setAvailabilityScanInitialDelay(Long.MAX_VALUE);
conf.setConfigurationDiscoveryInitialDelay(Long.MAX_VALUE);
conf.setContentDiscoveryInitialDelay(Long.MAX_VALUE);
conf.setEventSenderInitialDelay(Long.MAX_VALUE);
conf.setMeasurementCollectionInitialDelay(Long.MAX_VALUE);
conf.setServerDiscoveryInitialDelay(Long.MAX_VALUE);
conf.setServiceDiscoveryInitialDelay(Long.MAX_VALUE);
ServerServices serverServices = new ServerServices();
serverServices.setBundleServerService(context.mock(BundleServerService.class));
serverServices.setConfigurationServerService(context.mock(ConfigurationServerService.class));
serverServices.setContentServerService(context.mock(ContentServerService.class));
serverServices.setCoreServerService(context.mock(CoreServerService.class));
serverServices.setDiscoveryServerService(context.mock(DiscoveryServerService.class));
serverServices.setEventServerService(context.mock(EventServerService.class));
serverServices.setMeasurementServerService(context.mock(MeasurementServerService.class));
serverServices.setOperationServerService(context.mock(OperationServerService.class));
serverServices.setResourceFactoryServerService(context.mock(ResourceFactoryServerService.class));
serverServices.setDriftServerService(context.mock(DriftServerService.class));
conf.setServerServices(serverServices);
return conf;
}