You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2024/07/29 11:48:44 UTC

(brooklyn-server) branch master updated: fix for intermittent initializer test failure, now that it might run async with creation

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git


The following commit(s) were added to refs/heads/master by this push:
     new c10b07b151 fix for intermittent initializer test failure, now that it might run async with creation
     new b9ade38c0e Merge branch 'master' of https://gitbox.apache.org/repos/asf/brooklyn-server
c10b07b151 is described below

commit c10b07b15102a31ce3e02c5eab2682be8db4a1f4
Author: Alex Heneveld <gi...@alex.heneveld.org>
AuthorDate: Mon Jul 29 12:43:54 2024 +0100

    fix for intermittent initializer test failure, now that it might run async with creation
    
    async initializer might not complete until after startup completes.
    notes on possible future enhancements.
---
 .../java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java
index 7b3ea599a2..b4c87bca07 100644
--- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java
@@ -217,6 +217,11 @@ public class WorkflowYamlTest extends AbstractYamlTest {
         waitForApplicationTasks(app);
 
         Entity entity = Iterables.getOnlyElement(app.getChildren());
+
+        // may need to wait for workflow initializer. TBC whether this should be part of a REST application start, or another REST method.
+        // (maybe the default rest application create started should wait for these prior to invoking start? maybe they should be tagged as initialization?)
+        waitForApplicationTasks(entity);
+
         EntityAsserts.assertAttribute(entity, Sensors.newSensor(Object.class, "foo"), v -> {
             Asserts.assertInstanceOf(v, SpecialMap.class);
             Asserts.assertEquals( ((SpecialMap)v).x, "bar" );