mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-16 09:24:55 -06:00
fix summary reporting in testing
This commit is contained in:
parent
f44f885073
commit
1adf2a92c3
@ -119,9 +119,9 @@ public class Scenario implements Callable<ScenarioResult> {
|
||||
this.logsPath = logsPath;
|
||||
}
|
||||
|
||||
public Scenario(String name, Engine engine) {
|
||||
public Scenario(String name, Engine engine, String reportSummaryTo) {
|
||||
this.scenarioName = name;
|
||||
this.reportSummaryTo = "CONSOLE";
|
||||
this.reportSummaryTo = reportSummaryTo;
|
||||
this.engine = engine;
|
||||
this.commandLine = "";
|
||||
this.logsPath = Path.of("logs");
|
||||
|
@ -25,7 +25,7 @@ public class ScenarioTest {
|
||||
@Test
|
||||
public void shouldLoadScriptText() {
|
||||
ScriptEnvBuffer buffer = new ScriptEnvBuffer();
|
||||
Scenario env = new Scenario("testing", Scenario.Engine.Graalvm);
|
||||
Scenario env = new Scenario("testing", Scenario.Engine.Graalvm, "stdout:300");
|
||||
env.addScriptText("print('loaded script environment...');\n");
|
||||
env.runScenario();
|
||||
assertThat(env.getIOLog().get().get(0)).contains("loaded script environment...");
|
||||
|
@ -27,7 +27,7 @@ public class ScenariosExecutorTest {
|
||||
@Ignore
|
||||
public void testAwaitOnTime() {
|
||||
ScenariosExecutor e = new ScenariosExecutor(ScenariosExecutorTest.class.getSimpleName(), 1);
|
||||
Scenario s = new Scenario("testing", Scenario.Engine.Graalvm);
|
||||
Scenario s = new Scenario("testing", Scenario.Engine.Graalvm,"stdout:3000");
|
||||
s.addScriptText("load('classpath:scripts/asyncs.js');\nsetTimeout(\"print('waited')\",5000);\n");
|
||||
e.execute(s);
|
||||
ScenariosResults scenariosResults = e.awaitAllResults();
|
||||
|
@ -52,7 +52,8 @@ public class AsyncScriptIntegrationTests {
|
||||
String scenarioName = "scenario " + scriptname;
|
||||
System.out.println("=".repeat(29) + " Running ASYNC integration test for: " + scenarioName);
|
||||
ScenariosExecutor e = new ScenariosExecutor(AsyncScriptIntegrationTests.class.getSimpleName() + ":" + scriptname, 1);
|
||||
Scenario s = new Scenario(scenarioName, Scenario.Engine.Graalvm);
|
||||
Scenario s = new Scenario(scenarioName, Scenario.Engine.Graalvm,"stdout:300");
|
||||
|
||||
s.addScenarioScriptParams(paramsMap);
|
||||
|
||||
ClassLoader cl = AsyncScriptIntegrationTests.class.getClassLoader();
|
||||
|
@ -48,7 +48,7 @@ public class ScriptIntegrationTests {
|
||||
String scenarioName = "scenario " + scriptname;
|
||||
System.out.println("=".repeat(29) + " Running SYNC integration test for: " + scenarioName);
|
||||
ScenariosExecutor e = new ScenariosExecutor(ScriptIntegrationTests.class.getSimpleName() + ":" + scriptname, 1);
|
||||
Scenario s = new Scenario(scenarioName, Scenario.Engine.Graalvm);
|
||||
Scenario s = new Scenario(scenarioName, Scenario.Engine.Graalvm,"stdout:300");
|
||||
s.addScenarioScriptParams(paramsMap);
|
||||
ClassLoader cl = AsyncScriptIntegrationTests.class.getClassLoader();
|
||||
String script;
|
||||
|
Loading…
Reference in New Issue
Block a user