[ 
https://issues.apache.org/jira/browse/NIFI-8364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311848#comment-17311848
 ] 

ASF subversion and git services commented on NIFI-8364:
-------------------------------------------------------

Commit 89dda0b6a437f741ca011eb186decc35d92d9428 in nifi's branch 
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=89dda0b ]

NIFI-8364 This closes #4953. Set static date for TestQuerySolr

- Static date for TestQuerySolr avoids the potential for missing values in 
facet range queries

Signed-off-by: Joe Witt <[email protected]>


> 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: 50m
>  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)

Reply via email to