summaryrefslogtreecommitdiff
path: root/opendc-workflow/opendc-workflow-service/src/test
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-20 22:21:39 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-21 12:19:42 +0200
commitdf3c9dc3fcd2f89910575bfdc24a3db3af9eba0f (patch)
tree136246812bbf7b6063aa7b324397d580a1669dff /opendc-workflow/opendc-workflow-service/src/test
parentb8b0f39028af90fa54b42a00214b2ea9a5e48e2e (diff)
exp: Enable interpreter sharing across hosts
This change enables the experiments to share the SimResourceInterpreter across multiple hosts, which allows updates to be scheduled efficiently for all machines at the same time. This is especially beneficial if the machines operate on the same time slices.
Diffstat (limited to 'opendc-workflow/opendc-workflow-service/src/test')
-rw-r--r--opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt b/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt
index a8d3a9e8..6807572b 100644
--- a/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt
+++ b/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt
@@ -43,6 +43,7 @@ import org.opendc.format.environment.sc18.Sc18EnvironmentReader
import org.opendc.format.trace.gwf.GwfTraceReader
import org.opendc.simulator.compute.SimSpaceSharedHypervisorProvider
import org.opendc.simulator.core.runBlockingSimulation
+import org.opendc.simulator.resources.SimResourceInterpreter
import org.opendc.telemetry.sdk.toOtelClock
import org.opendc.workflow.service.internal.WorkflowServiceImpl
import org.opendc.workflow.service.scheduler.WorkflowSchedulerMode
@@ -68,6 +69,7 @@ internal class WorkflowServiceIntegrationTest {
.setClock(clock.toOtelClock())
.build()
+ val interpreter = SimResourceInterpreter(coroutineContext, clock)
val hosts = Sc18EnvironmentReader(object {}.javaClass.getResourceAsStream("/environment.json"))
.use { it.read() }
.map { def ->
@@ -77,7 +79,7 @@ internal class WorkflowServiceIntegrationTest {
def.model,
def.meta,
coroutineContext,
- clock,
+ interpreter,
MeterProvider.noop().get("opendc-compute-simulator"),
SimSpaceSharedHypervisorProvider()
)