Mercurial > stress-tester
changeset 906:3ea8aca2c6a9
Backed out changeset: a28637ab1e4f
author | Devel 2 |
---|---|
date | Wed, 18 Apr 2018 14:38:15 +0200 |
parents | a28637ab1e4f |
children | 9ad946f81619 |
files | stress-tester/src/main/java/com/passus/st/config/JobConfigurator.java stress-tester/src/main/java/com/passus/st/job/JobExecutor.java |
diffstat | 2 files changed, 1 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/config/JobConfigurator.java Wed Apr 18 14:36:26 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -package com.passus.st.config; - -import com.passus.commons.Assert; -import com.passus.config.Configuration; -import com.passus.config.ConfigurationContext; -import com.passus.config.validation.Errors; - -public abstract class JobConfigurator { - - protected Configuration config; - - public Errors init(Configuration config) { - Assert.notNull(config, "config"); - this.config = config; - return null; - } - - private void ensureConfigLoaded() { - if (config == null) { - throw new IllegalStateException("Configuration not loaded."); - } - } - - public final Errors validate(ConfigurationContext context) { - ensureConfigLoaded(); - return doValidate(context); - } - - public abstract Errors doValidate(ConfigurationContext context); - - public final Errors configure(ConfigurationContext context) { - ensureConfigLoaded(); - return doConfigure(context); - } - - public abstract Errors doConfigure(ConfigurationContext context); - - public final void destroy(ConfigurationContext context) { - ensureConfigLoaded(); - doDestroy(context); - } - - public abstract void doDestroy(ConfigurationContext context); - -}
--- a/stress-tester/src/main/java/com/passus/st/job/JobExecutor.java Wed Apr 18 14:36:26 2018 +0200 +++ b/stress-tester/src/main/java/com/passus/st/job/JobExecutor.java Wed Apr 18 14:38:15 2018 +0200 @@ -207,7 +207,7 @@ metricsCollector.setPeriodTime(2_000); //TODO Na razie pobieramy caly projekt, docelowo powinny byc tworzona kopia parametrow - Project project = STApp.PROJECT_MANAGER.init(context.getProjectId()); + Project project = STApp.PROJECT_MANAGER.load(context.getProjectId()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Configuring job: {} project id: {}, name: {}",