From f616b720406250b1415593ff04c9d910b1fda54c Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 22 Mar 2021 12:13:23 +0100 Subject: simulator: Expose capacity and remaining work outside consumer callback This change changes the consumer and context interfaces to expose the provider capacity and remaining work via the context instance as opposed to only via the callback. This simplifies aggregation of resources. --- .../src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt index c4bd0cb4..d7a3b744 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt +++ b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt @@ -137,8 +137,8 @@ internal class SimHostTest { assertAll( { assertEquals(emptyList(), scope.uncaughtExceptions, "No errors") }, { assertEquals(4281600, requestedWork, "Requested work does not match") }, - { assertEquals(3141600, grantedWork, "Granted work does not match") }, - { assertEquals(1140000, overcommittedWork, "Overcommitted work does not match") }, + { assertEquals(2241600, grantedWork, "Granted work does not match") }, + { assertEquals(2040000, overcommittedWork, "Overcommitted work does not match") }, { assertEquals(1200006, scope.currentTime) } ) } -- cgit v1.2.3