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

ElasticsearchDocumentSortTest unit tests failing intermittently

Details

    Description

      The following unit tests:

      com.liferay.portal.search.elasticsearch7.internal.sort.ElasticsearchDocumentSortTest.testFloatSortIgnoresScores
      com.liferay.portal.search.elasticsearch7.internal.sort.ElasticsearchDocumentSortTest.testIntegerSort
      com.liferay.portal.search.elasticsearch7.internal.sort.ElasticsearchDocumentSortTest.testDoubleSort

      are occasionally failing with:

      java.lang.ArrayIndexOutOfBoundsException: 20
      	at com.liferay.portal.search.elasticsearch7.internal.search.response.HitsImpl.doc(HitsImpl.java:65)
      	at com.liferay.portal.search.test.util.sort.BaseDocumentSortTestCase.lambda$null$1(BaseDocumentSortTestCase.java:145)
      	at com.liferay.portal.search.test.util.indexing.BaseIndexingTestCase$IndexingTestHelper.verify(BaseIndexingTestCase.java:464)
      	at com.liferay.portal.search.test.util.sort.BaseDocumentSortTestCase.lambda$assertSort$2(BaseDocumentSortTestCase.java:137)
      	at com.liferay.portal.search.test.util.indexing.BaseIndexingTestCase.lambda$assertSearch$0(BaseIndexingTestCase.java:203)
      	at com.liferay.portal.search.test.util.IdempotentRetryAssert.lambda$retryAssert$0(IdempotentRetryAssert.java:62)
      	at com.liferay.portal.search.test.util.IdempotentRetryAssert.retryAssert(IdempotentRetryAssert.java:43)
      	at com.liferay.portal.search.test.util.IdempotentRetryAssert.retryAssert(IdempotentRetryAssert.java:59)
      	at com.liferay.portal.search.test.util.indexing.BaseIndexingTestCase.assertSearch(BaseIndexingTestCase.java:201)
      	at com.liferay.portal.search.test.util.sort.BaseDocumentSortTestCase.assertSort(BaseDocumentSortTestCase.java:128)
      	at com.liferay.portal.search.test.util.sort.BaseDocumentSortTestCase.assertSort(BaseDocumentSortTestCase.java:168)
      	at com.liferay.portal.search.test.util.sort.BaseDocumentSortTestCase.testIntegerSort(BaseDocumentSortTestCase.java:86)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
      	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
      	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
      	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
      	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
      	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
      	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
      	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
      	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:119)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
      	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
      	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
      	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
      	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
      	at java.lang.Thread.run(Thread.java:745)
       

      Full console log

      Also, occasionally com.liferay.portal.search.elasticsearch7.internal.sort.ElasticsearchDocumentSortTest.testFloatSortIgnoresScores would fail with the following error instead of the one above:

           [exec] com.liferay.portal.search.elasticsearch7.internal.sort.ElasticsearchDocumentSortTest > testFloatSortIgnoresScores FAILED
           [exec]     org.junit.ComparisonFailure: 8.0E-5,8.0E-5,8.0E-5,8.0E-5,8.0E-5,8.0E-5,6.0E-5,6.0E-5,6.0E-5,6.0E-5,6.0E-5,6.0E-5,4.0E-5,4.0E-5,4.0E-5,4.0E-5,4.0E-5,4.0E-5 expected:<firstuser,[third]user,fifthuser> but was:<firstuser,[firstuser,firstuser,firstuser,firstuser,firstuser,thirduser,thirduser,thirduser,thirduser,thirduser,thirduser,fifthuser,fifthuser,fifthuser,fifthuser,fifth]user,fifthuser>
      

      Full console log

      Failure history

      Reproduced on:
      Tomcat 9.0.53 + MySQL 5.7 Portal Master GIT ID: 7c9735e1ae61a2433074bb6ebc1d26c83f849f4c

      Attachments

        Activity

          People

            brooke.dalton Brooke Dalton
            brooke.dalton Brooke Dalton
            Marta Elicegui Marta Elicegui
            Wade Cao Wade Cao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              34 weeks, 3 days ago
              Development End Date:

              Packages

                Version Package
                7.4.3.18 CE GA18
                7.4.3.19 CE GA19
                Master