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

[Elasticsearch 6] Failing integration test: WikiPageSearchTest.testSearchCommentsByKeyword with unexpected empty results

    Details

      Description

      After fixing LPS-119146, some integration test failures could be seen in other modules when running ci:test:search. Some of them are comment searches with keywords, like com.liferay.bookmarks.search.test.BookmarksEntrySearchTest.testSearchCommentsByKeywords,  and they have stack traces similar to this:

      java.lang.AssertionError: {"from":0,"size":10000,"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"match":{"comments":{"query":"Title"}}},{"match_phrase_prefix":{"comments":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"comments":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"content":{"query":"Title"}}},{"match_phrase_prefix":{"content":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"content":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"match":{"description":{"query":"Title"}}}],"should":[{"match_phrase":{"description":{"query":"Title","slop":50}}},{"match_phrase":{"description":{"query":"Title","boost":2.0}}}]}},{"bool":{"should":[{"wildcard":{"properties":{"wildcard":"*title*"}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"title":{"query":"Title"}}},{"match_phrase_prefix":{"title":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"title":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"url":{"query":"Title"}}},{"match_phrase_prefix":{"url":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"url":{"query":"Title","boost":2.0}}}]}},{"bool":{"should":[{"wildcard":{"userName":{"wildcard":"*title*"}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"assetCategoryTitles_en_US":{"query":"Title"}}},{"match_phrase_prefix":{"assetCategoryTitles_en_US":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"assetCategoryTitles_en_US":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"assetTagNames_en_US":{"query":"Title"}}},{"match_phrase_prefix":{"assetTagNames_en_US":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"assetTagNames_en_US":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"comments":{"query":"Title"}}},{"match_phrase_prefix":{"comments":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"comments":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"content":{"query":"Title"}}},{"match_phrase_prefix":{"content":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"content":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"match":{"description":{"query":"Title"}}}],"should":[{"match_phrase":{"description":{"query":"Title","slop":50}}},{"match_phrase":{"description":{"query":"Title","boost":2.0}}}]}},{"bool":{"should":[{"wildcard":{"properties":{"wildcard":"*title*"}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"title":{"query":"Title"}}},{"match_phrase_prefix":{"title":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"title":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"url":{"query":"Title"}}},{"match_phrase_prefix":{"url":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"url":{"query":"Title","boost":2.0}}}]}},{"bool":{"should":[{"wildcard":{"userName":{"wildcard":"*title*"}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"assetCategoryTitles_en_US":{"query":"Title"}}},{"match_phrase_prefix":{"assetCategoryTitles_en_US":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"assetCategoryTitles_en_US":{"query":"Title","boost":2.0}}}]}},{"bool":{"must":[{"bool":{"should":[{"match":{"assetTagNames_en_US":{"query":"Title"}}},{"match_phrase_prefix":{"assetTagNames_en_US":{"query":"Title"}}}]}}],"should":[{"match_phrase":{"assetTagNames_en_US":{"query":"Title","boost":2.0}}}]}}]}}]}}],"filter":[{"bool":{"must":[{"bool":{"must":[{"terms":{"groupId":["44475"]}},{"terms":{"scopeGroupId":["44475"]}}]}},{"bool":{"must":[{"terms":{"groupId":["44475"]}},{"terms":{"scopeGroupId":["44475"]}}]}},{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.asset.kernel.model.AssetCategory"}}}]}},{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.message.boards.model.MBMessage"}}},{"term":{"discussion":{"value":"true"}}},{"terms":{"status":["0"]}},{"bool":{"should":[{"bool":{"must":[{"term":{"classNameId":{"value":"20014"}}}]}}]}}]}}]}}]}}]}},"explain":false,"stored_fields":["entryClassPK","entryClassName","groupId","classNameId","userId","uid","companyId","classPK","assetCategoryIds","assetCategoryId","assetTagNames","layoutUuid","treePath"],"track_scores":true}->{docs={}, length=0, query=null] expected:<1> but was:<0>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:834)
      	at org.junit.Assert.assertEquals(Assert.java:645)
      	at com.liferay.portal.search.test.util.BaseSearchTestCase.assertBaseModelsCount(BaseSearchTestCase.java:269)
      	at com.liferay.portal.search.test.util.BaseSearchTestCase.searchComments(BaseSearchTestCase.java:735)
      	at com.liferay.portal.search.test.util.BaseSearchTestCase.testSearchCommentsByKeywords(BaseSearchTestCase.java:160)
      	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 com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$2.evaluate(TestExecutorRunnable.java:234)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.test.rule.LiferayIntegrationTestRule$1$1.evaluate(LiferayIntegrationTestRule.java:154)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.TimeoutTestRule$1.evaluate(TimeoutTestRule.java:89)
      	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:86)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.test.rule.LiferayIntegrationTestRule$1$1.evaluate(LiferayIntegrationTestRule.java:154)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181)
      	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95)
      	at java.lang.Thread.run(Thread.java:745)

      Links

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bryan.engler Bryan Engler
              Reporter:
              adam.brandizzi Adam Brandizzi
              Engineering Assignee:
              Bryan Engler
              Recent user:
              Bryan Engler
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package