summaryrefslogtreecommitdiff
path: root/opendc/opendc-compute/src/test/kotlin/com
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2020-04-10 23:21:21 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2020-04-10 23:21:21 +0200
commit5310dd64606f398bddcaef87f26eee94b663b39d (patch)
tree8cb4c2a4643962d43b83bb8804f84611d5196d18 /opendc/opendc-compute/src/test/kotlin/com
parentebcda5df6a858256d2022f091d10da4083b00258 (diff)
parentead9f9680792878f51be58d931c6337edeefae4b (diff)
Merge branch 'bug/virt-driver-interference' into '2.x'
Fix incorrect reporting of overcommission See merge request opendc/opendc-simulator!53
Diffstat (limited to 'opendc/opendc-compute/src/test/kotlin/com')
-rw-r--r--opendc/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/opendc/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt b/opendc/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt
index 58d784b0..4f3abc02 100644
--- a/opendc/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt
+++ b/opendc/opendc-compute/src/test/kotlin/com/atlarge/opendc/compute/virt/HypervisorTest.kt
@@ -62,8 +62,8 @@ internal class HypervisorTest {
val driverDom = root.newDomain("driver")
- val cpuNode = ProcessingNode("Intel", "Xeon", "amd64", 2)
- val cpus = List(2) { ProcessingUnit(cpuNode, it, 2000.0) }
+ val cpuNode = ProcessingNode("Intel", "Xeon", "amd64", 1)
+ val cpus = List(1) { ProcessingUnit(cpuNode, it, 2000.0) }
val metalDriver = SimpleBareMetalDriver(driverDom, UUID.randomUUID(), "test", emptyMap(), cpus, emptyList())
metalDriver.init()
@@ -75,6 +75,7 @@ internal class HypervisorTest {
val flavor = Flavor(1, 0)
val vmDriver = metalDriver.refresh().server!!.services[VirtDriver]
+ vmDriver.events.onEach { println(it) }.launchIn(this)
val vmA = vmDriver.spawn("a", workloadA, flavor)
vmA.events.onEach { println(it) }.launchIn(this)
val vmB = vmDriver.spawn("b", workloadB, flavor)