mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
avoid creating _scenario.js for test
This commit is contained in:
parent
600b5f6c2d
commit
4a46c17d9a
@ -114,7 +114,7 @@ public class BasicScriptBuffer implements ScriptBuffer {
|
||||
public String getParsedScript() {
|
||||
String scripttext = sb.toString();
|
||||
|
||||
if (this.createPath != null) {
|
||||
if (this.createPath != null && !this.createPath.isEmpty()) {
|
||||
Path tocreate = Path.of(createPath);
|
||||
|
||||
if (Files.exists(tocreate) && !tocreate.getFileName().toString().startsWith("_")) {
|
||||
|
@ -12,7 +12,7 @@ public class BasicScriptBufferTest {
|
||||
public void testScriptInterpolation() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"script", "script_to_interpolate", "parameter1=replaced"});
|
||||
|
||||
BasicScriptBuffer b = new BasicScriptBuffer();
|
||||
BasicScriptBuffer b = new BasicScriptBuffer(null);
|
||||
b.add(opts.getCommands().toArray(new Cmd[0]));
|
||||
String s = b.getParsedScript();
|
||||
|
||||
@ -23,7 +23,7 @@ public class BasicScriptBufferTest {
|
||||
@Test
|
||||
public void testAutoScriptCommand() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "acommand" });
|
||||
BasicScriptBuffer b = new BasicScriptBuffer();
|
||||
BasicScriptBuffer b = new BasicScriptBuffer(null);
|
||||
b.add(opts.getCommands().toArray(new Cmd[0]));
|
||||
String s = b.getParsedScript();
|
||||
|
||||
@ -37,7 +37,7 @@ public class BasicScriptBufferTest {
|
||||
"testscripts/printscript.js",
|
||||
"param1=value1"
|
||||
});
|
||||
BasicScriptBuffer b = new BasicScriptBuffer();
|
||||
BasicScriptBuffer b = new BasicScriptBuffer(null);
|
||||
b.add(opts.getCommands().toArray(new Cmd[0]));
|
||||
String script = b.getParsedScript();
|
||||
|
||||
@ -55,7 +55,7 @@ public class BasicScriptBufferTest {
|
||||
"paramname=another",
|
||||
"param2=andanother"
|
||||
});
|
||||
BasicScriptBuffer b = new BasicScriptBuffer();
|
||||
BasicScriptBuffer b = new BasicScriptBuffer(null);
|
||||
b.add(opts.getCommands().toArray(new Cmd[0]));
|
||||
String script = b.getParsedScript();
|
||||
|
||||
@ -65,7 +65,7 @@ public class BasicScriptBufferTest {
|
||||
@Test(expected = NumberFormatException.class)
|
||||
public void shouldThrowErrorForInvalidWaitMillisOperand() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "waitmillis", "noway" });
|
||||
BasicScriptBuffer b = new BasicScriptBuffer();
|
||||
BasicScriptBuffer b = new BasicScriptBuffer(null);
|
||||
b.add(opts.getCommands().toArray(new Cmd[0]));
|
||||
String s = b.getParsedScript();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user