Uploaded image for project: 'Apache Any23 (Retired)'
  1. Apache Any23 (Retired)
  2. ANY23-256

MicrodataParserTest failing locally but not on Jenkins

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • None
    • 2.2
    • None
    • None

    Description

      MicrodataParserTest is failing locally for me but it isn't on Jenkins.

      The comparison looks quite brittle, and is at the full document scale, so not sure what the difference in my environment is (possibly Java-8 related?), but the test likely needs to be split up to target each piece separately and in a consistent manner.

      MicrodataParserTest.testAdvancedItemrefManagement:63->extractItemsAndVerifyJSONSerialization:195 Error while comparing result [0] expected:<...[1]/DIV[1]/DIV[1]/A[[2]", "name" : "p4", "value" :

      { "content" : "http://www.domain.org/path/2", "type" : "Link" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[1]/DIV[1]/P[2]", "name" : "p3", "value" :

      { "content" : "Some Text 2", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[1]/DIV[1]/P[1]", "name" : "p2", "value" :

      { "content" : "Some Text 1", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[1]/DIV[1]/A[1]", "name" : "p1", "value" :

      { "content" : "http://www.domain.org/path/1]", "type" : "Link" }

      ...> but was:<...[1]/DIV[1]/DIV[1]/A[[1]", "name" : "p1", "value" :

      { "content" : "http://www.domain.org/path/1", "type" : "Link" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[1]/DIV[1]/P[1]", "name" : "p2", "value" :

      { "content" : "Some Text 1", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[1]/DIV[1]/P[2]", "name" : "p3", "value" :

      { "content" : "Some Text 2", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[1]/DIV[1]/A[2]", "name" : "p4", "value" :

      { "content" : "http://www.domain.org/path/2]", "type" : "Link" }

      ...>
      MicrodataParserTest.testNestedMicrodata:55->extractItemsAndVerifyJSONSerialization:195 Error while comparing result [0] expected:<...: "/HTML[1]/BODY[1]/[DIV[2]", "name" : "band", "value" : { "content" : { "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "id" : "b", "refs" : ["c"], "type" : null, "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Jazz Band", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[2]/SPAN[1]", "name" : "size", "value" :

      { "content" : "12", "type" : "Plain" }

      } ] }, "type" : "Nested" } }, { "xpath" : "/HTML[1]/BODY[1]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Amanda", "type" : "Plain]" }

      } ] }> but was:<...: "/HTML[1]/BODY[1]/[P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Amanda", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "name" : "band", "value" : { "content" : { "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "id" : "b", "refs" : ["c"], "type" : null, "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[2]/SPAN[1]", "name" : "size", "value" :

      { "content" : "12", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Jazz Band", "type" : "Plain" }

      } ] }, "type" : "Nested]" } } ] }>
      MicrodataParserTest.testBasicFeatures:47->extractItemsAndVerifyJSONSerialization:195 Error while comparing result [2] expected:<...1]/BODY[1]/DIV[3]/P[[2]/SPAN[1]", "name" : "band", "value" :

      { "content" : "Four Parts Water", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[3]/SPAN[1]", "name" : "nationality", "value" :

      { "content" : "British", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[1]/SPAN[1]", "name" : "name", "value" : { "content" : "Neil]", "type" : "Plain" ...> but was:<...1]/BODY[1]/DIV[3]/P[[3]/SPAN[1]", "name" : "nationality", "value" :

      { "content" : "British", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Neil", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[2]/SPAN[1]", "name" : "band", "value" : { "content" : "Four Parts Water]", "type" : "Plain" ...>
      MicrodataParserTest.testMicrodataJSONSerialization:79 Unexpected serialization for Microdata file. expected:<...: "/HTML[1]/BODY[1]/[DIV[2]", "name" : "band", "value" : { "content" : { "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "id" : "b", "refs" : ["c"], "type" : null, "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Jazz Band", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[2]/SPAN[1]", "name" : "size", "value" :

      { "content" : "12", "type" : "Plain" }

      } ] }, "type" : "Nested" } }, { "xpath" : "/HTML[1]/BODY[1]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Amanda", "type" : "Plain" }

      } ] }, { "xpath" : "/HTML[1]/BODY[1]/DIV[4]", "id" : null, "refs" : [], "type" : "http://schema.org/Movie", "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/H1[1]", "name" : "name", "value" :

      { "content" : "Avatar", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/DIV[1]", "name" : "director", "value" : { "content" : { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/DIV[1]", "id" : null, "refs" : [], "type" : "http://schema.org/Person", "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/DIV[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "James Cameron", "type" : "Plain" }

      } ] }, "type" : "Nested]" } } ] }] }> but was:<...: "/HTML[1]/BODY[1]/[P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Amanda", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "name" : "band", "value" : { "content" : { "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "id" : "b", "refs" : ["c"], "type" : null, "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[2]/SPAN[1]", "name" : "size", "value" :

      { "content" : "12", "type" : "Plain" }

      }, { "xpath" : "/HTML[1]/BODY[1]/DIV[3]/P[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "Jazz Band", "type" : "Plain" }

      } ] }, "type" : "Nested" } } ] }, { "xpath" : "/HTML[1]/BODY[1]/DIV[4]", "id" : null, "refs" : [], "type" : "http://schema.org/Movie", "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/DIV[1]", "name" : "director", "value" : { "content" : { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/DIV[1]", "id" : null, "refs" : [], "type" : "http://schema.org/Person", "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/DIV[1]/SPAN[1]", "name" : "name", "value" :

      { "content" : "James Cameron", "type" : "Plain" }

      } ] }, "type" : "Nested" } }, { "xpath" : "/HTML[1]/BODY[1]/DIV[4]/H1[1]", "name" : "name", "value" :

      { "content" : "Avatar", "type" : "Plain]" }

      } ] }] }>

      Attachments

        Activity

          People

            Unassigned Unassigned
            ansell Peter Ansell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: