Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The test EnrichersSlightlySimplerYamlTest.testWithAppEnricher fails non-deterministically in 1.0.0-SNAPSHOT:
2017-11-10 20:17:47,520 INFO TESTNG FAILED: "Surefire test" - org.apache.brooklyn.qa.camp.EnrichersSlightlySimplerYamlTest.testWithAppEnricher() finished in 1582 ms java.lang.AssertionError: Wrong URI: expected [true] but found [false] at org.apache.brooklyn.qa.camp.EnrichersSlightlySimplerYamlTest.testWithAppEnricher(EnrichersSlightlySimplerYamlTest.java:90)
This is because the cluster and app's URIs are initially set to an empty MAIN_URI! There is a joiner that takes the urls.list and generates an empty string. This is coerced to a URI by calling URI.create(""), which surprisingly gives you a URI with a null scheme, hostname, etc. You can make the fail consistently by adding the assertions below before setting the IPs on the members of the cluster:
EntityAsserts.assertAttributeEqualsContinually(cluster, Attributes.MAIN_URI, null); EntityAsserts.assertAttributeEqualsContinually(app, Attributes.MAIN_URI, null);