manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahmet Arslan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONNECTORS-1189) SearchBlox connector fails tests on JDK 1.8
Date Tue, 26 Apr 2016 19:54:12 GMT

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

Ahmet Arslan commented on CONNECTORS-1189:
------------------------------------------

Hi [~naveenann] , thanks for chiming in! I looked at your pull request, please correct me
if I am wrong but in your PR, you just replaced the expected string according to jdk8, right?
This test would fail in another JDK. We should check each key-value pairs independently. Order
of the key-value pairs may change jdk vendor to vendor.  For example test case should pass
the following example in an order-free manner:

{code:title=expected}
{
  "apikey": "apikey",
  "description": "I am a little tiny description",
  "title": "I am a nice title",
  "content": "I am a nice content in english!",
  "contenttype": "html"
}
{code}

{code:title=actual}
{
  "contenttype": "html",
  "content": "I am a nice content in english!",
  "title": "I am a nice title",
  "description": "I am a little tiny description",
  "apikey": "apikey"
}
{code}
Please see the how others solved the same problem in a generic way : https://issues.apache.org/jira/browse/PIG-3309

> SearchBlox connector fails tests on JDK 1.8
> -------------------------------------------
>
>                 Key: CONNECTORS-1189
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1189
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: SearchBlox connector
>    Affects Versions: ManifoldCF 1.9, ManifoldCF 2.1
>            Reporter: Karl Wright
>            Assignee: Alessandro Benedetti
>            Priority: Critical
>             Fix For: ManifoldCF 2.5
>
>
> The following occurs when you run the SearchBlox connector tests on JDK 1.8:
> {code}
> run-tests:
>     [junit] Testsuite: org.apache.manifoldcf.agents.output.searchblox.tests.SearchBloxDocumentTest
>     [junit] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.159 sec
>     [junit]
>     [junit] Testcase: testUpdateJsonString(org.apache.manifoldcf.agents.output.searchblox.tests.SearchBloxDocumentTest):
       FAILED
>     [junit] null expected:<{"[document":{"content":"I am a nice content in english!","uid":"URI","title":"I
am a nice title","description":"I am a little tiny description","contenttype":"html","colname":"collection1","meta":{"meta2":["I
am META2!"],"meta1":["I am META1!"],"share_allow":["user3","user2","user1"],"share_deny":["user4","user5"],"document_deny":["user52","user42"],"document_allow":["user22","user12","user33"]},"size":"100"},"apikey":"apikey"]}>
but was:<{"[apikey":"apikey","document":{"uid":"URI","colname":"collection1","size":"100","meta":{"meta2":["I
am META2!"],"meta1":["I am META1!"],"share_allow":["user1","user2","user3"],"document_deny":["user42","user52"],"share_deny":["user5","user4"],"document_allow":["user22","user33","user12"]},"description":"I
am a little tiny description","title":"I am a nice title","content":"I am a nice content in
english!","contenttype":"html"}]}>
>     [junit] junit.framework.ComparisonFailure: null expected:<{"[document":{"content":"I
am a nice content in english!","uid":"URI","title":"I am a nice title","description":"I am
a little tiny description","contenttype":"html","colname":"collection1","meta":{"meta2":["I
am META2!"],"meta1":["I am META1!"],"share_allow":["user3","user2","user1"],"share_deny":["user4","user5"],"document_deny":["user52","user42"],"document_allow":["user22","user12","user33"]},"size":"100"},"apikey":"apikey"]}>
but was:<{"[apikey":"apikey","document":{"uid":"URI","colname":"collection1","size":"100","meta":{"meta2":["I
am META2!"],"meta1":["I am META1!"],"share_allow":["user1","user2","user3"],"document_deny":["user42","user52"],"share_deny":["user5","user4"],"document_allow":["user22","user33","user12"]},"description":"I
am a little tiny description","title":"I am a nice title","content":"I am a nice content in
english!","contenttype":"html"}]}>
>     [junit]     at org.apache.manifoldcf.agents.output.searchblox.tests.SearchBloxDocumentTest.testUpdateJsonString(SearchBloxDocumentTest.java:61)
>     [junit]
>     [junit]
> BUILD FAILED
> /Users/molgun/Downloads/apache-manifoldcf-2.1/dist/connector-build.xml:1219: Test org.apache.manifoldcf.agents.output.searchblox.tests.SearchBloxDocumentTest
failed
> {code}
> That's because the test depends on JDK hash order.  It needs to be fixed so that it doesn't
depend on hash order.
> I will disable the test in trunk and dev_1x for now, but already it is interfering with
the release of the latest ManifoldCF.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message