Github user ahgittin commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/873#discussion_r149347708 --- Diff: launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogOsgiTest.java --- @@ -740,20 +744,82 @@ public void testRebindUpgradeEntity() throws Exception { Entity entity = Iterables.getOnlyElement( Iterables.getOnlyElement(launcherLast.getManagementContext().getApplications()).getChildren() ); // assert it was updated + Assert.assertEquals(entity.getCatalogItemId(), "simple-entity:2.0.0"); - Assert.assertEquals(entity.getCatalogItemId(), "simple-entity:1.0.0"); - // TODO when upgrades work at level of catalog item ID and bundle ID, do below instead of above -// Assert.assertEquals(entity.getCatalogItemId(), "simple-entity:2.0.0"); + if (CatalogUpgrades.markerForCodeThatLoadsJavaTypesButShouldLoadRegisteredType()) { + Assert.assertEquals(Entities.deproxy(entity).getClass().getName(), BasicEntityImpl.class.getName()); + } else { + Assert.assertEquals(Entities.deproxy(entity).getClass().getName(), "com.example.brooklyn.test.osgi.entities.SimpleEntityImpl"); + } + } + + @Test + public void testRebindUpgradeReferencedEntityFromCatalogAndDeployment() throws Exception { + File initialBomFileV2 = prepForRebindRemovedItemTestReturningBomV2(false, true); --- End diff -- yes
---