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:
parent
6d32217e7f
commit
99f43db475
@ -1092,7 +1092,7 @@ public class NBCLIOptions {
|
||||
default:
|
||||
throw new RuntimeException(
|
||||
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
|
||||
public void listWorkloads() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "--list-workloads"}, NBCLIOptions.Mode.ParseAllOptions);
|
||||
|
Loading…
Reference in New Issue
Block a user