Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/816#discussion_r141631128
--- Diff:
core/src/test/java/org/apache/brooklyn/core/effector/EffectorSayHiTest.java ---
@@ -99,6 +99,23 @@ public void testInvokeEffectors1() throws Exception {
}
@Test
+ public void testInvocationSubmission() throws Exception {
+ assertEquals(((EntityInternal)e).getExecutionContext()
+ .submit( Effectors.invocation(e, MyEntity.SAY_HI_1,
ImmutableMap.of("name", "Bob", "greeting", "hi")) ).get(), "hi Bob");
+ }
+ @Test
+ public void testInvocationGet() throws Exception {
+ assertEquals(((EntityInternal)e).getExecutionContext()
+ .get( Effectors.invocation(e, MyEntity.SAY_HI_1,
ImmutableMap.of("name", "Bob", "greeting", "hi")) ), "hi Bob");
+ }
+
+ @Test(groups="WIP") // see comments at
BasicExecutionContext.getImmediately
+ public void testInvocationGetImmediately() throws Exception {
+ assertEquals(((EntityInternal)e).getExecutionContext()
+ .getImmediately( Effectors.invocation(e, MyEntity.SAY_HI_1,
ImmutableMap.of("name", "Bob", "greeting", "hi")) ), "hi Bob");
--- End diff --
agree, good point -- same issue i'll come back to
---