You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Alex Heneveld (JIRA)" <ji...@apache.org> on 2016/02/25 02:36:18 UTC

[jira] [Commented] (BROOKLYN-231) Unpredictable test, deleting catalog item not guaranteed through persistence

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

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

what the test does is

* mgmt1 has 2 catalog items
* rebinds into mgmt2
* mgmt2 deletes 1 catalog item
* rebinds into mgmt3
* checks mgmt3 has 1 catalog item

it's failing at the last step, mgmt3 has 2 catalog items.  the debug log reveals that there is a thread probably from mgmt1 writing 2 catalog items AFTER mgmt2 writes the 1 catalog item.  (search for "checkpointed".)

need to check why mgmt1 is not ending.  i think we're not running with HA so it's probably a test issue, not shutting it down cleanly.

> 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)