summaryrefslogtreecommitdiff
path: root/simulator/opendc-workflows/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-01-11 20:13:46 +0100
committerGitHub <noreply@github.com>2021-01-11 20:13:46 +0100
commitbf558fe36c9de52310e85044ee4447b45bd50b75 (patch)
treebea8e47037660c88df42e04105e7a0b7f709173a /simulator/opendc-workflows/src
parent42e9a5b5b610f41a03e68f6fc781c54b9402925b (diff)
parent9dbb7bbcc2202955c715aaa3b28c70641a2fbd5b (diff)
Merge pull request #71 from atlarge-research/perf/workload
Convert to pull-based workload model
Diffstat (limited to 'simulator/opendc-workflows/src')
-rw-r--r--simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt2
-rw-r--r--simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt5
2 files changed, 4 insertions, 3 deletions
diff --git a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
index 2c8d9a0b..e04c8a4c 100644
--- a/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
+++ b/simulator/opendc-workflows/src/main/kotlin/org/opendc/workflows/service/StageWorkflowService.kt
@@ -340,7 +340,7 @@ public class StageWorkflowService(
}
}
- private suspend fun finishJob(job: JobState) {
+ private fun finishJob(job: JobState) {
activeJobs -= job
tracer.commit(WorkflowEvent.JobFinished(this, job.job))
rootListener.jobFinished(job)
diff --git a/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt b/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
index b97cb915..2bfcba35 100644
--- a/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
+++ b/simulator/opendc-workflows/src/test/kotlin/org/opendc/workflows/service/StageWorkflowSchedulerIntegrationTest.kt
@@ -41,6 +41,7 @@ import org.opendc.compute.simulator.SimVirtProvisioningService
import org.opendc.compute.simulator.allocation.NumberOfActiveServersAllocationPolicy
import org.opendc.format.environment.sc18.Sc18EnvironmentReader
import org.opendc.format.trace.gwf.GwfTraceReader
+import org.opendc.simulator.compute.SimSpaceSharedHypervisorProvider
import org.opendc.simulator.utils.DelayControllerClockAdapter
import org.opendc.trace.core.EventTracer
import org.opendc.workflows.service.stage.job.NullJobAdmissionPolicy
@@ -59,7 +60,7 @@ internal class StageWorkflowSchedulerIntegrationTest {
* A large integration test where we check whether all tasks in some trace are executed correctly.
*/
@Test
- fun `should execute all tasks in trace`() {
+ fun testTrace() {
var jobsSubmitted = 0L
var jobsStarted = 0L
var jobsFinished = 0L
@@ -79,7 +80,7 @@ internal class StageWorkflowSchedulerIntegrationTest {
// Wait for the bare metal nodes to be spawned
delay(10)
- val provisioner = SimVirtProvisioningService(testScope, clock, bareMetal, NumberOfActiveServersAllocationPolicy(), tracer, schedulingQuantum = 1000)
+ val provisioner = SimVirtProvisioningService(testScope, clock, bareMetal, NumberOfActiveServersAllocationPolicy(), tracer, SimSpaceSharedHypervisorProvider(), schedulingQuantum = 1000)
// Wait for the hypervisors to be spawned
delay(10)