Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
msmygit committed Apr 12, 2024
1 parent efc82f0 commit fa7ffee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 nosqlbench
* Copyright (c) 2022-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -105,7 +105,7 @@ public void testThatTemplateParamsAreExpandedAndNotRemovedOverride() {
List<Cmd> cmds = opts.getCommands();
assertThat(cmds.size()).isEqualTo(1);
assertThat(cmds.get(0).getArgMap()).isEqualTo(Map.of(
"_impl","run",
"_impl", "run",
"alias", "with_template",
"container", "template_test",
"cycles", "20",
Expand Down Expand Up @@ -178,7 +178,7 @@ public void testSubStepSelection() {
List<Cmd> cmds = opts.getCommands();
assertThat(cmds.size()).isEqualTo(1);
assertThat(cmds.get(0).getArgMap()).isEqualTo(Map.of(
"_impl","run",
"_impl", "run",
"alias", "schema",
"container", "schema_only",
"cycles-test", "20",
Expand All @@ -188,7 +188,7 @@ public void testSubStepSelection() {
"tags", "block:\"schema.*\"",
"workload", "scenario_test"
));
NBCLIOptions opts1 = new NBCLIOptions(new String[]{"local/example_scenarios", "namedsteps.one", "testparam1=testvalue2"}, NBCLIOptions.Mode.ParseAllOptions);
NBCLIOptions opts1 = new NBCLIOptions(new String[]{"example_scenarios", "namedsteps.one", "testparam1=testvalue2"}, NBCLIOptions.Mode.ParseAllOptions);
List<Cmd> cmds1 = opts1.getCommands();
assertThat(cmds1.size()).isEqualTo(1);
assertThat(cmds1.get(0).getArgValueOrNull("cycles_test")).isNull();
Expand Down
@@ -0,0 +1,15 @@
# example-scenarios.yaml
scenarios:
default:
one: run cycles=3 alias=A driver=stdout
two: run cycles=5 alias=B driver=stdout
namedsteps:
one: run cycles=3 alias=A driver=stdout testparam1=testvalue1
two: run cycles=5 alias=B driver=stdout

bindings:
cycle: Identity()
name: NumberNameToCycle()

ops:
cycle: "cycle {cycle}\n"

0 comments on commit fa7ffee

Please sign in to comment.