You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2021/03/30 18:05:00 UTC

[jira] [Reopened] (NIFI-8364) TestQuerySolr is unreliable and needs to be reworked

     [ https://issues.apache.org/jira/browse/NIFI-8364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Handermann reopened NIFI-8364:
------------------------------------

After several successful runs, {{TestQuerySolr}} failed again when evaluating the total count values from {{facet_ranges}}.  Even after optimizing execution time, apparently the range start and end parameters provide only one minute, which can lead to occasional failures.  Expanding this range to several minutes should avoid additional failures.

> TestQuerySolr is unreliable and needs to be reworked
> ----------------------------------------------------
>
>                 Key: NIFI-8364
>                 URL: https://issues.apache.org/jira/browse/NIFI-8364
>             Project: Apache NiFi
>          Issue Type: Task
>            Reporter: Joe Witt
>            Assignee: David Handermann
>            Priority: Major
>             Fix For: 1.14.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> As found in Github CI this test is unreliable: https://github.com/apache/nifi/runs/2185571184?check_suite_focus=true
> In looking at what failed we get 
> Error:  Tests run: 17, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 9.28 s <<< FAILURE! - in org.apache.nifi.processors.solr.TestQuerySolr
> Error:  testAllFacetCategories(org.apache.nifi.processors.solr.TestQuerySolr)  Time elapsed: 0.385 s  <<< FAILURE!
> java.lang.AssertionError: expected:<6> but was:<10>
> 	at org.apache.nifi.processors.solr.TestQuerySolr.testAllFacetCategories(TestQuerySolr.java:191)
> Error:  Failures: 
> Error:    TestQuerySolr.testAllFacetCategories:191 expected:<6> but was:<10>
> Error:  Tests run: 64, Failures: 1, Errors: 0, Skipped: 0
> In looking at the code we see a lot of concerns with the test.
> - It appears to set the datetime as a static call.  Not sure if this is great for other tests or whether isolated.  But such a practice should be avoided.
> - the way it creates a client depends on target dir - seems problematic
> - it inverts expected vs actual in many places including the failing line.
> - it might be a candidate as a system test mroe than a unit test.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)