diff --git a/tests/vault/gear/scheduler-activity-test.cpp b/tests/vault/gear/scheduler-activity-test.cpp index 94ab20e0a..29c29d9d8 100644 --- a/tests/vault/gear/scheduler-activity-test.cpp +++ b/tests/vault/gear/scheduler-activity-test.cpp @@ -26,10 +26,12 @@ #include "lib/test/run.hpp" +#include "lib/test/test-helper.hpp" #include "activity-detector.hpp" #include "vault/gear/activity-lang.hpp" +#include "vault/real-clock.hpp" #include "lib/time/timevalue.hpp" -//#include "lib/format-cout.hpp" +#include "lib/format-cout.hpp" /////////////////////////////////////TODO //#include "lib/util.hpp" //#include @@ -68,6 +70,7 @@ namespace test { verifyActivity_Invoke(); verifyActivity_Notify(); + verifyActivity_Post(); verifyActivity_Gate(); termBuilder(); @@ -94,13 +97,41 @@ namespace test { - /** @test TODO behaviour of Activity::INVOKE - * @todo WIP 7/23 🔁 define ⟶ implement + /** @test behaviour of Activity::INVOKE + * - setup requires two FEED-Activities to be chained up as arguments + * - use the rigged execution context provided by ActivityDetector + * - can verify this way that the activation leads to JobFunctor invocation */ void verifyActivity_Invoke() { ActivityDetector detector; + + size_t x1=rand(), x2=rand(); + Time nomTime = lib::test::randTime(); + Activity feed{x1,x2}; + Activity feed2{x1+1,x1+2}; + feed.next = &feed2; + Activity invoke{detector.buildMockJobFunctor("job"), nomTime, feed}; + + Time realTime = RealClock::now(); + CHECK (activity::PASS == invoke.activate (realTime, detector.executionCtx)); + + cout << detector.showLog()< - + + + @@ -78457,9 +78459,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + +
@@ -78650,6 +78653,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ @@ -79028,12 +79032,18 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + +
- + - + + + + @@ -79418,8 +79428,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -79476,8 +79486,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -82154,8 +82164,14 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + + + + + + +