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

BlogsEntryTrashHandlerTest.testTrashAndRestoreApproved() is failing

    Details

      Description

      The test calls:

      BlogsEntryLocalServiceUtil.updateStatus(..), BlogsEntryServiceUtil.moveEntryToTrash(...)

      too quickly, making:

      BlogsEntryPersistenceImpl.countByG_U_LtD_S (Finder cached in this instance)
      and
      BlogsEntryPersistenceImpl.findByG_U_LtD_S_First

      inconsistent, leading to:

           [junit] Testcase: testTrashAndRestoreApproved(com.liferay.portlet.trash.BlogsEntryTrashHandlerTest):	Caused an ERROR
          [junit] No BlogsEntry exists with the key {groupId=20513, userId=10193, displayDate=Thu Jun 07 16:59:28 UTC 2012, status=0}
          [junit] com.liferay.portlet.blogs.NoSuchEntryException: No BlogsEntry exists with the key {groupId=20513, userId=10193, displayDate=Thu Jun 07 16:59:28 UTC 2012, status=0}
          [junit] 	at com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistenceImpl.findByG_U_LtD_S_First(BlogsEntryPersistenceImpl.java:13937)
          [junit] 	at com.liferay.portlet.blogs.service.impl.BlogsStatsUserLocalServiceImpl.updateStatsUser(BlogsStatsUserLocalServiceImpl.java:195)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
          [junit] 	at $Proxy141.updateStatsUser(Unknown Source)
          [junit] 	at com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl.updateStatus(BlogsEntryLocalServiceImpl.java:1034)
          [junit] 	at com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl.moveEntryToTrash(BlogsEntryLocalServiceImpl.java:755)
          [junit] 	at com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl.moveEntryToTrash(BlogsEntryLocalServiceImpl.java:812)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
          [junit] 	at $Proxy139.moveEntryToTrash(Unknown Source)
          [junit] 	at com.liferay.portlet.blogs.service.impl.BlogsEntryServiceImpl.moveEntryToTrash(BlogsEntryServiceImpl.java:361)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
          [junit] 	at $Proxy140.moveEntryToTrash(Unknown Source)
          [junit] 	at com.liferay.portlet.blogs.service.BlogsEntryServiceUtil.moveEntryToTrash(BlogsEntryServiceUtil.java:200)
          [junit] 	at com.liferay.portlet.trash.BlogsEntryTrashHandlerTest.testTrash(BlogsEntryTrashHandlerTest.java:202)
          [junit] 	at com.liferay.portlet.trash.BlogsEntryTrashHandlerTest.testTrashAndRestoreApproved(BlogsEntryTrashHandlerTest.java:78)
          [junit] 	at com.liferay.portal.test.RunBeforeTestMethodCallback.evaluate(RunBeforeTestMethodCallback.java:45)
          [junit] 	at com.liferay.portal.test.RunAfterTestMethodCallback.evaluate(RunAfterTestMethodCallback.java:48)
          [junit] 	at com.liferay.portal.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:39)
          [junit] 	at com.liferay.portal.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ken.duenwald Ken Duenwald
              Reporter:
              shinn.lok Shinn Lok (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 6 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2