Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31305

Fix TestAggregates random failure

    XMLWordPrintable

    Details

    • Release Notes Summary:
      We now reset es index before each TestAggregates's test execution
    • Tags:
    • Sprint:
      nxplatform #71, nxplatform #72
    • Story Points:
      2

      Description

      We are seeing

      [2022-10-03T12:36:51.574Z] [ERROR] testPageProvider(org.nuxeo.elasticsearch.test.aggregates.TestAggregates)  Time elapsed: 1.019 s  <<< ERROR!
      [2022-10-03T12:36:51.574Z] org.nuxeo.ecm.core.api.NuxeoException: ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [dc:source] in order to load field data by uninverting the inverted index. Note that this can use significant memory.]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [dc:source] in order to load field data by uninverting the inverted index. Note that this can use significant memory.]];
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.client.ESRestClient.search(ESRestClient.java:409)
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl.search(ElasticSearchServiceImpl.java:228)
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl.queryAndAggregate(ElasticSearchServiceImpl.java:115)
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.ElasticSearchComponent.queryAndAggregate(ElasticSearchComponent.java:536)
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider.getCurrentPage(ElasticSearchNxqlPageProvider.java:113)
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider.getAggregates(ElasticSearchNxqlPageProvider.java:200)
      [2022-10-03T12:36:51.574Z] 	at org.nuxeo.elasticsearch.test.aggregates.TestAggregates.testPageProvider(TestAggregates.java:422)
      

      in both 2021 and 2023 branches since few days

      We are suspecting a change in the order of the unit tests execution which would reveal a previous test that did not clear its mapping.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: