Search in sources :

Example 31 with ConfigGroup

use of org.guvnor.structure.server.config.ConfigGroup in project kie-wb-common by kiegroup.

the class ResourceChangeIncrementalBuilderConcurrencyTest method setUp.

@Before
public void setUp() throws Exception {
    // Define mandatory properties
    List<ConfigGroup> globalConfigGroups = configurationService.getConfiguration(ConfigType.GLOBAL);
    boolean globalSettingsDefined = false;
    for (ConfigGroup globalConfigGroup : globalConfigGroups) {
        if (GLOBAL_SETTINGS.equals(globalConfigGroup.getName())) {
            globalSettingsDefined = true;
            break;
        }
    }
    if (!globalSettingsDefined) {
        configurationService.addConfiguration(getGlobalConfiguration());
    }
    final URL pomUrl = this.getClass().getResource("/BuildChangeListenerRepo/pom.xml");
    final org.uberfire.java.nio.file.Path nioPomPath = fs.getPath(pomUrl.toURI());
    pomPath = paths.convert(nioPomPath);
    final URL resourceUrl = this.getClass().getResource("/BuildChangeListenerRepo/src/main/resources/update.drl");
    final org.uberfire.java.nio.file.Path nioResourcePath = fs.getPath(resourceUrl.toURI());
    resourcePath = paths.convert(nioResourcePath);
    executor = (ThreadPoolExecutor) Executors.newCachedThreadPool();
    executorManagerFactory.getExecutorManager().setExecutorService(executor);
}
Also used : ConfigGroup(org.guvnor.structure.server.config.ConfigGroup) URL(java.net.URL) Before(org.junit.Before)

Example 32 with ConfigGroup

use of org.guvnor.structure.server.config.ConfigGroup in project kie-wb-common by kiegroup.

the class ResourceChangeIncrementalBuilderConcurrencyTest method getGlobalConfiguration.

private ConfigGroup getGlobalConfiguration() {
    // Global Configurations used by many of Drools Workbench editors
    final ConfigGroup group = configurationFactory.newConfigGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, "");
    group.addConfigItem(configurationFactory.newConfigItem("build.enable-incremental", "true"));
    return group;
}
Also used : ConfigGroup(org.guvnor.structure.server.config.ConfigGroup)

Example 33 with ConfigGroup

use of org.guvnor.structure.server.config.ConfigGroup in project kie-wb-common by kiegroup.

the class ResourceChangeIncrementalBuilderWithoutFullBuildTest method getGlobalConfiguration.

private ConfigGroup getGlobalConfiguration() {
    // Global Configurations used by many of Drools Workbench editors
    final ConfigGroup group = configurationFactory.newConfigGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, "");
    group.addConfigItem(configurationFactory.newConfigItem("build.enable-incremental", "true"));
    return group;
}
Also used : ConfigGroup(org.guvnor.structure.server.config.ConfigGroup)

Example 34 with ConfigGroup

use of org.guvnor.structure.server.config.ConfigGroup in project kie-wb-common by kiegroup.

the class ResourceChangeIncrementalBuilderTest method getGlobalConfiguration.

private ConfigGroup getGlobalConfiguration() {
    // Global Configurations used by many of Drools Workbench editors
    final ConfigGroup group = configurationFactory.newConfigGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, "");
    group.addConfigItem(configurationFactory.newConfigItem("build.enable-incremental", "true"));
    return group;
}
Also used : ConfigGroup(org.guvnor.structure.server.config.ConfigGroup)

Example 35 with ConfigGroup

use of org.guvnor.structure.server.config.ConfigGroup in project kie-wb-common by kiegroup.

the class ResourceChangeIncrementalBuilderTest method setUp.

@Before
public void setUp() throws Exception {
    // Define mandatory properties
    List<ConfigGroup> globalConfigGroups = configurationService.getConfiguration(ConfigType.GLOBAL);
    boolean globalSettingsDefined = false;
    for (ConfigGroup globalConfigGroup : globalConfigGroups) {
        if (GLOBAL_SETTINGS.equals(globalConfigGroup.getName())) {
            globalSettingsDefined = true;
            break;
        }
    }
    if (!globalSettingsDefined) {
        configurationService.addConfiguration(getGlobalConfiguration());
    }
}
Also used : ConfigGroup(org.guvnor.structure.server.config.ConfigGroup) Before(org.junit.Before)

Aggregations

ConfigGroup (org.guvnor.structure.server.config.ConfigGroup)40 Test (org.junit.Test)15 ConfigItem (org.guvnor.structure.server.config.ConfigItem)9 ArrayList (java.util.ArrayList)7 ConfigType (org.guvnor.structure.server.config.ConfigType)6 List (java.util.List)5 Before (org.junit.Before)4 HashMap (java.util.HashMap)3 File (java.io.File)2 Path (java.nio.file.Path)2 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)2 URL (java.net.URL)1 WorkspaceProject (org.guvnor.common.services.project.model.WorkspaceProject)1 Repository (org.guvnor.structure.repositories.Repository)1 GitRepository (org.guvnor.structure.repositories.impl.git.GitRepository)1 WorkDefinition (org.jbpm.process.core.WorkDefinition)1 ExampleRepository (org.kie.workbench.common.screens.examples.model.ExampleRepository)1 Mockito.anyString (org.mockito.Mockito.anyString)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1 CommentedOption (org.uberfire.java.nio.base.options.CommentedOption)1