shinnlok/liferay-portal — pull request #24 by danielreuther (2013-03-08 13:50:16+00:00)
Title: LPS-28990 Test adjustments

Hi Shinn,

I admittedly had some problems figuring out whom to send this to. But since this is upgrade related, I hoped it would be okay to send this to you.

QA notified me about an issue with one of our test cases that has been surfaced by the latest changes for LPS-28990 in ee-6.1.x.

The problem here is that the upgrade process runs DB-level queries on data that has not been persisted before. This has not caused issues before because the LayoutTypePortlet.hasPortletId check returned true based on the existence of PortletPreferences entries. The recent change in ee-6.1.x however, has a different logic.

And even though this is currently no problem on trunk, I believe that we should fix it there as well (especially considering that we're still working on the permission logic for embedded portlets).

In essence, the fix simply writes the changed typesettings back to the DB and cleans all the caches after the upgrade process (because the data changed on DB-level at that point). Clearing the finder cache only is not enough because Hibernate will still fetch it from its own cache in case it's enabled.

Btw, I didn't really know which LPS number to use; but since the issue was surfaced by the new LPS-28990 logic, I figured it'd be best to use that.

Thanks much,
Daniel