summaryrefslogtreecommitdiff
path: root/simulator/opendc-workflow/opendc-workflow-service
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-04-21 17:00:09 +0200
committerGitHub <noreply@github.com>2021-04-21 17:00:09 +0200
commit10dfc257de65cbbd1e25d1d7f5833bfb687d85ed (patch)
tree48b102c4d45b366abd8d0d368c31d6c0596ac30f /simulator/opendc-workflow/opendc-workflow-service
parentb4d1289bbd9539c041e8aeb39bb8962628399809 (diff)
parent62678b2890a7f3640836b99ca2fec9efd7485929 (diff)
simulator: Introduce SimulationCoroutineDispatcher (#120)
This change introduces the SimulationCoroutineDispatcher implementation which replaces the TestCoroutineDispatcher for running single-threaded simulations.
Diffstat (limited to 'simulator/opendc-workflow/opendc-workflow-service')
-rw-r--r--simulator/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/simulator/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt b/simulator/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt
index be59c8d2..a8d3a9e8 100644
--- a/simulator/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt
+++ b/simulator/opendc-workflow/opendc-workflow-service/src/test/kotlin/org/opendc/workflow/service/WorkflowServiceIntegrationTest.kt
@@ -29,7 +29,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
-import kotlinx.coroutines.test.runBlockingTest
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
@@ -43,7 +42,7 @@ import org.opendc.compute.simulator.SimHost
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.simulator.core.runBlockingSimulation
import org.opendc.telemetry.sdk.toOtelClock
import org.opendc.workflow.service.internal.WorkflowServiceImpl
import org.opendc.workflow.service.scheduler.WorkflowSchedulerMode
@@ -63,9 +62,7 @@ internal class WorkflowServiceIntegrationTest {
* A large integration test where we check whether all tasks in some trace are executed correctly.
*/
@Test
- fun testTrace() = runBlockingTest {
- val clock = DelayControllerClockAdapter(this)
-
+ fun testTrace() = runBlockingSimulation {
val meterProvider: MeterProvider = SdkMeterProvider
.builder()
.setClock(clock.toOtelClock())