Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-76850

Adding StagingPermissionChecker breaks SearchPermissionCheckerTest

    Details

      Description

       

      After adding LPS-61794, (introduction of StagingPermissionChecker) SearchPermissionCheckerTest fails with the following:

      AXIS_VARIABLE=0,label_exp=!master #382
      SearchPermissionCheckerTest.testGroupPermissionFilter
      junit.framework.AssertionFailedError: expected:<true> but was:<false>
      	at com.liferay.portal.search.SearchPermissionCheckerTest.assertFieldValue(SearchPermissionCheckerTest.java:266)
      	at com.liferay.portal.search.SearchPermissionCheckerTest.assertFieldValue(SearchPermissionCheckerTest.java:255)
      	at com.liferay.portal.search.SearchPermissionCheckerTest.testGroupPermissionFilter(SearchPermissionCheckerTest.java:154)
      	at com.liferay.portal.kernel.test.RunBeforeTestMethodCallback.evaluate(RunBeforeTestMethodCallback.java:45)
      	at com.liferay.portal.kernel.test.RunAfterTestMethodCallback.evaluate(RunAfterTestMethodCallback.java:49)
      	at com.liferay.portal.kernel.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:39)
      	at com.liferay.portal.kernel.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
      	at com.liferay.portal.test.LiferayIntegrationJUnitTestRunner$1.evaluate(LiferayIntegrationJUnitTestRunner.java:74)
      SearchPermissionCheckerTest.testGuestPermissionFilter
      junit.framework.AssertionFailedError: expected:<true> but was:<false>
      	at com.liferay.portal.search.SearchPermissionCheckerTest.assertFieldValue(SearchPermissionCheckerTest.java:266)
      	at com.liferay.portal.search.SearchPermissionCheckerTest.assertFieldValue(SearchPermissionCheckerTest.java:255)
      	at com.liferay.portal.search.SearchPermissionCheckerTest.testGuestPermissionFilter(SearchPermissionCheckerTest.java:194)
      	at com.liferay.portal.kernel.test.RunBeforeTestMethodCallback.evaluate(RunBeforeTestMethodCallback.java:45)
      	at com.liferay.portal.kernel.test.RunAfterTestMethodCallback.evaluate(RunAfterTestMethodCallback.java:49)
      	at com.liferay.portal.kernel.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:39)
      	at com.liferay.portal.kernel.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
      	at com.liferay.portal.test.LiferayIntegrationJUnitTestRunner$1.evaluate(LiferayIntegrationJUnitTestRunner.java:74)
      SearchPermissionCheckerTest.testOrganizationRolePermissionFilter
      junit.framework.AssertionFailedError: expected:<true> but was:<false>
      	at com.liferay.portal.search.SearchPermissionCheckerTest.assertFieldValue(SearchPermissionCheckerTest.java:266)
      	at com.liferay.portal.search.SearchPermissionCheckerTest.assertFieldValue(SearchPermissionCheckerTest.java:255)
      	at com.liferay.portal.search.SearchPermissionCheckerTest.testOrganizationRolePermissionFilter(SearchPermissionCheckerTest.java:217)
      	at com.liferay.portal.kernel.test.RunBeforeTestMethodCallback.evaluate(RunBeforeTestMethodCallback.java:45)
      	at com.liferay.portal.kernel.test.RunAfterTestMethodCallback.evaluate(RunAfterTestMethodCallback.java:49)
      	at com.liferay.portal.kernel.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:39)
      	at com.liferay.portal.kernel.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
      	at com.liferay.portal.test.LiferayIntegrationJUnitTestRunner$1.evaluate(LiferayIntegrationJUnitTestRunner.java:74)
      ...
      AXIS_VARIABLE=16,label_exp=!master #382
      JournalArticleSearchTest.testBaseModelUserPermissions
      junit.framework.AssertionFailedError: expected:<0> but was:<1>
      	at com.liferay.portlet.journal.search.JournalArticleSearchTest.checkUserPermissionsBaseModelsSearchCount(JournalArticleSearchTest.java:317)
      	at com.liferay.portal.search.BaseSearchTestCase.testUserPermissions(BaseSearchTestCase.java:937)
      	at com.liferay.portal.search.BaseSearchTestCase.testBaseModelUserPermissions(BaseSearchTestCase.java:78)
      	at com.liferay.portal.kernel.test.RunBeforeTestMethodCallback.evaluate(RunBeforeTestMethodCallback.java:45)
      	at com.liferay.portal.kernel.test.RunAfterTestMethodCallback.evaluate(RunAfterTestMethodCallback.java:49)
      	at com.liferay.portal.kernel.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:39)
      	at com.liferay.portal.kernel.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
      	at com.liferay.portal.test.LiferayIntegrationJUnitTestRunner$1.evaluate(LiferayIntegrationJUnitTestRunner.java:74)
      

      The solution would be to remove SearchPermissionChecker's dependency on AdvancedPermissionChecker, much like how it was done on master in LPS-57227

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 40 weeks, 5 days ago

                  Packages

                  Version Package
                  6.2.X EE