[ 
https://issues.apache.org/jira/browse/BROOKLYN-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15166780#comment-15166780
 ] 

Alex Heneveld commented on BROOKLYN-231:
----------------------------------------

actually BROOKLYN-204 seems a different cause.  it's now looking like mgmt2 
(aka XmCah7ox) is updating sample_location (the deleted item) and deleting it 
in the same iteration, whereas the successful tests run faster and do that on 
two iterations.  i'm wondering if that's the cause.

> Unpredictable test, deleting catalog item not guaranteed through persistence
> ----------------------------------------------------------------------------
>
>                 Key: BROOKLYN-231
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-231
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Alex Heneveld
>
> Observed in 
> https://builds.apache.org/job/brooklyn-master-build/org.apache.brooklyn$brooklyn-core/19/testReport/junit/org.apache.brooklyn.core.mgmt.rebind/RebindCatalogItemTest/testAddAndRebindAndDeleteLocation/
> From the error message it looks like the deletion is not guaranteed to be 
> picked up by persistence.
> Error Message
> Sets differ: expected [com.example.ExampleApp:9.1.3] but got 
> [com.example.ExampleApp:9.1.3, sample_location:0.0.1]
> Stacktrace
> java.lang.AssertionError: Sets differ: expected 
> [com.example.ExampleApp:9.1.3] but got [com.example.ExampleApp:9.1.3, 
> sample_location:0.0.1]
>       at org.testng.Assert.fail(Assert.java:94)
>       at org.testng.Assert.assertEquals(Assert.java:806)
>       at org.testng.Assert.assertEquals(Assert.java:784)
>       at 
> org.apache.brooklyn.core.mgmt.rebind.RebindTestFixture.assertCatalogsEqual(RebindTestFixture.java:288)
>       at 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.rebindAndAssertCatalogsAreEqual(RebindCatalogItemTest.java:283)
>       at 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.testAddAndRebindAndDeleteLocation(RebindCatalogItemTest.java:185)
> Standard Output
> 2016-02-17 01:01:11,412 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" 
> - @AfterMethod 
> org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport.tearDown()
> 2016-02-17 01:01:11,421 WARN  Setting Application[M6UGmDSN] on-fire due to 
> problems when expected running, up=false, not-up-indicators: 
> {service.state=Application stopping}
> 2016-02-17 01:01:11,428 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
> @AfterMethod 
> org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport.tearDown() finished 
> in 16 ms
> 2016-02-17 01:01:11,429 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" 
> - @BeforeMethod 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.setUp()
> 2016-02-17 01:01:11,538 INFO  Test class 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest persisting to 
> /tmp/RebindCatalogItemTest-HOPQ
> 2016-02-17 01:01:11,555 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
> @BeforeMethod 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.setUp() finished 
> in 127 ms
> 2016-02-17 01:01:11,556 INFO  TESTNG INVOKING: "Surefire test" - 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.testAddAndRebindAndDeleteLocation()
> 2016-02-17 01:01:11,558 WARN  Legacy CatalogLoadMode 
> LOAD_BROOKLYN_CATALOG_URL set: applying, but this should be changed to use 
> new CLI --catalogXxx commands
> 2016-02-17 01:01:11,595 INFO  Rebinding app, using mementoDir 
> /tmp/RebindCatalogItemTest-HOPQ; object store null
> 2016-02-17 01:01:11,681 INFO  Rebinding from /tmp/RebindCatalogItemTest-HOPQ 
> for master TvJBFrIf...
> 2016-02-17 01:01:11,724 INFO  Rebind complete (MASTER) in 121ms: 1 app, 2 
> entities, 0 locations, 0 policies, 2 enrichers, 0 feeds, 2 catalog items
> 2016-02-17 01:01:11,741 INFO  Deleted item from catalog: sample_location:0.0.1
> 2016-02-17 01:01:11,749 INFO  Count of incomplete tasks now 0, 0 unended; 
> tasks remembered are: []
> 2016-02-17 01:01:11,757 INFO  Rebinding app, using mementoDir 
> /tmp/RebindCatalogItemTest-HOPQ; object store null
> 2016-02-17 01:01:11,797 INFO  Rebinding from /tmp/RebindCatalogItemTest-HOPQ 
> for master fTqApBF7...
> 2016-02-17 01:01:11,846 INFO  Rebind complete (MASTER) in 81ms: 1 app, 2 
> entities, 0 locations, 0 policies, 2 enrichers, 0 feeds, 2 catalog items
> 2016-02-17 01:01:11,885 INFO  TESTNG FAILED: "Surefire test" - 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.testAddAndRebindAndDeleteLocation()
>  finished in 328 ms
> java.lang.AssertionError: Sets differ: expected 
> [com.example.ExampleApp:9.1.3] but got [com.example.ExampleApp:9.1.3, 
> sample_location:0.0.1]
>       at 
> org.apache.brooklyn.core.mgmt.rebind.RebindTestFixture.assertCatalogsEqual(RebindTestFixture.java:288)
>       at 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.rebindAndAssertCatalogsAreEqual(RebindCatalogItemTest.java:283)
>       at 
> org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest.testAddAndRebindAndDeleteLocation(RebindCatalogItemTest.java:185)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to