diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-14 17:00:56 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-14 17:00:56 +0200 |
| commit | eab45064155fd7823a31cba1e779501616475b55 (patch) | |
| tree | 160252d677da7ab06bf0553b8c3105a9a463a057 /simulator | |
| parent | af3546a9d658ccce0d59400a7218c8edf5a7ce5c (diff) | |
harness: Enable failures only on request
This changes fixes a bug where the simulator obtained the incorrect
failure frequency causing failures to be enabled even when the user
disabled it.
Diffstat (limited to 'simulator')
| -rw-r--r-- | simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt index 90918f44..1ab67a61 100644 --- a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt +++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt @@ -276,7 +276,7 @@ public class RunnerCli : CliktCommand(name = "runner") { ) val topologyId = scenario.getEmbedded(listOf("topology", "topologyId"), ObjectId::class.java) val environment = TopologyParser(topologies, topologyId) - val failureFrequency = operational.get("failureFrequency", Number::class.java)?.toDouble() ?: 24.0 * 7 + val failureFrequency = if (operational.getBoolean("failuresEnabled", false)) 24.0 * 7 else 0.0 withComputeService(clock, meterProvider, environment, allocationPolicy) { scheduler -> val failureDomain = if (failureFrequency > 0) { |
