You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/04/16 07:43:42 UTC

[GitHub] [nifi] ijokarumawak commented on issue #4072: NIFI-7182

ijokarumawak commented on issue #4072: NIFI-7182
URL: https://github.com/apache/nifi/pull/4072#issuecomment-614473511
 
 
   @MikeThomsen @joewitt 
   
   The test is using Solr range facetting which depends on system date. Specifically the test uses `facet.range.start=NOW/MINUTE` and `facet.range.end=NOW/MINUTE+1MINUTE`.
   
   That range condition can be fail if the minutes when the processor executes the query, and the date field value are different. That can be happen by a long GC pause or in an extremely bad timing.
   For example, if `createSolrClient()` method creates the doc at `10:23:59.999`, and the query is executed at `10:24:001`, then the facet range would be `10:24 to 10:25` which does not query documents created at `10:23`.
   
   I was able to reproduce the assertion error by addint `Thread.sleep(60_000)` at the `testAllFacet Categories` method between it creates `solorClient` and `runner.run`.
   
   Since the test does not have to filter documents by date range, we can make the range wider (cannot remove the range as Solr requires it). I suggest changing the facet range as follows:
   ```
           runner.setProperty("facet.range.start", "NOW/MINUTE-3MINUTE");
           runner.setProperty("facet.range.end", "NOW/MINUTE+3MINUTE");
   ```
   
   This makes the test passing even with sleeping 1 minute between doc creation and query execution.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services