mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Add LoggerConfigData unit test (#2077)
This commit is contained in:
@@ -1092,7 +1092,7 @@ public class NBCLIOptions {
|
|||||||
default:
|
default:
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
NBCLIOptions.LOG_HISTOGRAMS +
|
NBCLIOptions.LOG_HISTOGRAMS +
|
||||||
" options must be in either 'regex:filename:interval' or 'regex:filename' or 'filename' format"
|
" options must be in either 'filename:regex:interval' or 'filename:regex' or 'filename' format"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,6 +197,16 @@ public class TestNBCLIOptions {
|
|||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testLoggerConfigData() {
|
||||||
|
NBCLIOptions opts = new NBCLIOptions(new String[]{ "--log-histograms", "console.log:.*:30000"}, NBCLIOptions.Mode.ParseAllOptions);
|
||||||
|
for (final NBCLIOptions.LoggerConfigData histoLogger : opts.getHistoLoggerConfigs()) {
|
||||||
|
assertThat(histoLogger.pattern).isEqualTo(".*");
|
||||||
|
assertThat(histoLogger.file).isEqualTo("console.log");
|
||||||
|
assertThat(histoLogger.millis).isEqualTo(30000L);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void listWorkloads() {
|
public void listWorkloads() {
|
||||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "--list-workloads"}, NBCLIOptions.Mode.ParseAllOptions);
|
NBCLIOptions opts = new NBCLIOptions(new String[]{ "--list-workloads"}, NBCLIOptions.Mode.ParseAllOptions);
|
||||||
|
|||||||
Reference in New Issue
Block a user