mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
clarify multiple scenario entry points
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
* Copyright (c) 2022-2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ public class ScenarioTest {
|
||||
@Test
|
||||
public void shouldLoadScriptText() {
|
||||
ScriptEnvBuffer buffer = new ScriptEnvBuffer();
|
||||
Scenario scenario = new Scenario("testing", Scenario.Engine.Graalvm, "stdout:300", Maturity.Any);
|
||||
Scenario scenario = Scenario.forTesting("testing", Scenario.Engine.Graalvm, "stdout:300", Maturity.Any);
|
||||
scenario.addScriptText("print('loaded script environment...');\n");
|
||||
try {
|
||||
var result=scenario.call();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
* Copyright (c) 2022-2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ public class ScenariosExecutorTest {
|
||||
@Disabled
|
||||
public void testAwaitOnTime() {
|
||||
ScenariosExecutor e = new ScenariosExecutor(ScenariosExecutorTest.class.getSimpleName(), 1);
|
||||
Scenario s = new Scenario("testing", Scenario.Engine.Graalvm,"stdout:3000", Maturity.Any);
|
||||
Scenario s = Scenario.forTesting("testing", Scenario.Engine.Graalvm,"stdout:3000", Maturity.Any);
|
||||
s.addScriptText("load('classpath:scripts/asyncs.js');\nsetTimeout(\"print('waited')\",5000);\n");
|
||||
e.execute(s);
|
||||
ScenariosResults scenariosResults = e.awaitAllResults();
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ScriptExampleTests {
|
||||
String scenarioName = "scenario " + scriptname;
|
||||
System.out.println("=".repeat(29) + " Running integration test for example scenario: " + scenarioName);
|
||||
ScenariosExecutor executor = new ScenariosExecutor(ScriptExampleTests.class.getSimpleName() + ":" + scriptname, 1);
|
||||
Scenario s = new Scenario(scenarioName, Scenario.Engine.Graalvm,"stdout:300", Maturity.Any);
|
||||
Scenario s = Scenario.forTesting(scenarioName, Scenario.Engine.Graalvm,"stdout:300", Maturity.Any);
|
||||
|
||||
s.addScenarioScriptParams(paramsMap);
|
||||
|
||||
@@ -261,7 +261,7 @@ public class ScriptExampleTests {
|
||||
public void testErrorPropagationFromAdapterOperation() {
|
||||
ExecutionMetricsResult scenarioResult = runScenario(
|
||||
"basicdiag",
|
||||
"type", "diag", "cyclerate", "5", "erroroncycle", "10", "cycles", "2000"
|
||||
"driver", "diag", "cyclerate", "5", "erroroncycle", "10", "cycles", "2000"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user