Skip to content

Commit

Permalink
fixed empty runScenario method and made it final
Browse files Browse the repository at this point in the history
  • Loading branch information
jshook committed Oct 6, 2023
1 parent 9d9d6ef commit 1d02ebd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public NBSceneFixtures asFixtures() {
return (NBSceneFixtures) this;
}

// public static NBSceneBuffer init(String name) {
// TestComponent root = new TestComponent("scene", "self");
// return new NBSceneBuffer(NBDefaultSceneFixtures.ofDefault(name));
// }
public static NBSceneBuffer init(String name) {
TestComponent root = new TestComponent("scene", "self");
return new NBSceneBuffer(NBDefaultSceneFixtures.ofDefault(name));
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,21 @@ public void exitWithCode() {
public String getIOLog() {
return fixtures.getIOLog();
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder("ScenarioResult [")
.append(this.endedAt - this.startedAt)
.append("ms]");
if (exception==null) {
sb.append(" OK ");
} else {
sb.append(" ERROR ").append(exception);
}
String iolog = getIOLog();
if (!iolog.isEmpty()) {
sb.append(" IO{\n").append("}\n").append(iolog);
}
return sb.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ public SC_activity_error(NBComponent parentComponent, String scenarioName) {
super(parentComponent, scenarioName);
}

@Override
protected void runScenario(NBSceneFixtures shell) {

// HdrHistoLogPluginData hdrHistoLogPluginData = new HdrHistoLogPluginData();
// HdrHistoLogPlugin histologplugin = hdrHistoLogPluginData.getExtensionObject(...);
// histologplugin.logHistoIntervals(...);

// HdrHistoLogPlugin logplugin = shell.extensions().get("histologger",HdrHistoLogPlugin.class);

// var serviceojbect = extensions.get("histologger");

// AttachedMetricsSummaryReporter reporter = shell.runtime().create().summaryReporter(5, "labelname", "labelvalue");

}

/**
* Equivalent to javascript form:
* <pre>{@code
Expand Down Expand Up @@ -73,7 +58,7 @@ public void invoke() {
);
stdout.write("starting activity activity_error");
controller.start(activitydef1);
controller.waitMillis(2000);
controller.waitMillis(500);
controller.getActivityDef("activity_error").getParams().set("threads","unparsable"); // forced error
controller.awaitActivity("activity_error", Long.MAX_VALUE);
}
Expand Down

0 comments on commit 1d02ebd

Please sign in to comment.