mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-11 00:12:04 -06:00
remove duplicitous call path
This commit is contained in:
parent
945f48983c
commit
0699b446a6
@ -51,9 +51,6 @@ public class ScenariosExecutor extends NBBaseComponent {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public synchronized void execute(NBScenario scenario) {
|
||||
execute(scenario,new ScriptParams());
|
||||
}
|
||||
public synchronized void execute(NBScenario scenario, Map<String,String> params) {
|
||||
if (submitted.get(scenario.getScenarioName()) != null) {
|
||||
throw new BasicError("Scenario " + scenario.getScenarioName() + " is already defined. Remove it first to reuse the name.");
|
||||
|
@ -38,7 +38,7 @@ public class NBScenarioTest {
|
||||
scenario.addScriptText("print('loaded script environment...');\n");
|
||||
try {
|
||||
ScenariosExecutor executor = new ScenariosExecutor(TestComponent.INSTANCE, "test", 1);
|
||||
executor.execute(scenario);
|
||||
executor.execute(scenario,Map.of());
|
||||
ScenarioResult result = executor.awaitAllResults().getOne();
|
||||
assertThat(result.getIOLog()).contains("loaded script environment...");
|
||||
} catch (Exception e) {
|
||||
|
@ -33,7 +33,7 @@ public class ScenariosExecutorTest {
|
||||
ScenariosExecutor e = new ScenariosExecutor(new TestComponent("id","test-await-on-time"),ScenariosExecutorTest.class.getSimpleName(), 1);
|
||||
NBScriptedScenario scenario = NBScriptedScenario.ofScripted("testing", Map.of(),new TestComponent("scripted-scenario","scripted-scenario"), NBScriptedScenario.Invocation.EXECUTE_SCRIPT);
|
||||
scenario.addScriptText("load('classpath:scripts/asyncs.js');\nsetTimeout(\"print('waited')\",5000);\n");
|
||||
e.execute(scenario);
|
||||
e.execute(scenario,Map.of());
|
||||
ScenariosResults scenariosResults = e.awaitAllResults();
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,8 @@ import io.nosqlbench.nbr.examples.injava.*;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class DirectRuntimeScenarioTests {
|
||||
@ -37,7 +39,7 @@ public class DirectRuntimeScenarioTests {
|
||||
TestComponent testC = new TestComponent("testroot", "testroot");
|
||||
SC_activity_error sc1 = new SC_activity_error(TestComponent.EMPTY_COMPONENT, "test");
|
||||
ScenariosExecutor executor = new ScenariosExecutor(TestComponent.EMPTY_COMPONENT, "test", 1);
|
||||
executor.execute(sc1);
|
||||
executor.execute(sc1, Map.of());
|
||||
ScenariosResults results = executor.awaitAllResults();
|
||||
System.out.println(results);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user