nosqlbench-2149 Label values should not be constrained (#2150)

This commit is contained in:
Jonathan Shook
2025-01-16 14:08:28 -06:00
committed by GitHub
parent bc759c0e81
commit c0093efdd3
5 changed files with 154 additions and 6 deletions

View File

@@ -83,16 +83,22 @@ class ActivityExecutorTest {
// }
@Test
synchronized void testAdvisorError() {
synchronized void testLabelingError() {
// TODO improve contextual labeling assertions
try {
ActivityDef activityDef = ActivityDef.parseActivityDef("driver=diag;alias=test-delayed-start;cycles=1000;initdelay=2000;");
ActivityDef activityDef = ActivityDef.parseActivityDef("driver=diag;"
+ "alias=test-delayed-start;"
+ "cycles=1000;initdelay=2000;"
+ "labels=invalid-name:valid"
+ "-value");
new ActivityTypeLoader().load(activityDef, TestComponent.INSTANCE);
Activity activity = new DelayedInitActivity(activityDef);
fail("Expected an Advisor exception");
} catch (NBAdvisorException e) {
} catch (RuntimeException e) {
assertThat(e.toString().contains("error"));
assertThat(e.getExitCode() == 2);
// assertThat(e.getExitCode() == 2);
}
}