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 65cac11c3f use bean with type to load beans in tests 65cac11c3f is described below commit 65cac11c3f838d07bac2901a4e2c863ec86a0139 Author: Alex Heneveld <a...@cloudsoft.io> AuthorDate: Fri Jan 26 13:18:12 2024 +0000 use bean with type to load beans in tests better access to private constructors --- .../java/org/apache/brooklyn/core/workflow/WorkflowBasicTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/apache/brooklyn/core/workflow/WorkflowBasicTest.java b/core/src/test/java/org/apache/brooklyn/core/workflow/WorkflowBasicTest.java index 9287cfb8b2..364a7090e9 100644 --- a/core/src/test/java/org/apache/brooklyn/core/workflow/WorkflowBasicTest.java +++ b/core/src/test/java/org/apache/brooklyn/core/workflow/WorkflowBasicTest.java @@ -37,6 +37,7 @@ import org.apache.brooklyn.core.entity.Dumper; import org.apache.brooklyn.core.entity.Entities; import org.apache.brooklyn.core.entity.EntityAsserts; import org.apache.brooklyn.core.entity.EntityInternal; +import org.apache.brooklyn.core.resolve.jackson.BeanWithTypePlanTransformer; import org.apache.brooklyn.core.resolve.jackson.BeanWithTypeUtils; import org.apache.brooklyn.core.sensor.Sensors; import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport; @@ -78,7 +79,11 @@ public class WorkflowBasicTest extends BrooklynMgmtUnitTestSupport { @SuppressWarnings("deprecation") public static RegisteredType addRegisteredTypeBean(ManagementContext mgmt, String symName, Class<?> clazz) { return BrooklynAppUnitTestSupport.addRegisteredTypeBean(mgmt, symName, VERSION, - new BasicTypeImplementationPlan(JavaClassNameTypePlanTransformer.FORMAT, clazz.getName())); + new BasicTypeImplementationPlan( + BeanWithTypePlanTransformer.FORMAT, "type: "+ + // above is better than below because it can access private constructors +// JavaClassNameTypePlanTransformer.FORMAT, + clazz.getName())); } public static RegisteredType addRegisteredTypeSpec(ManagementContext mgmt, String symName, Class<?> clazz, Class<? extends BrooklynObject> superClazz) {