Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-5677

ProcessInstanceMarshallTest - incorrect marshaller chosen for some types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 1.10.0.Final
    • None
    • None
    • None
    • False
    • False
    • Undefined
    • Hide

      add sorting in ProcessInstanceMarshallTest.defaultStrategies() ->

      return strats.stream().sorted().toArray(ObjectMarshallerStrategy[]::new);

      run tests

       

      Show
      add sorting in ProcessInstanceMarshallTest.defaultStrategies() -> return strats.stream(). sorted ().toArray(ObjectMarshallerStrategy[]::new); run tests  

    Description

      cnicolai@redhat.com
      In most tests the object marshaller is used instead of their specific marshaller since in the marshaller array it is quite at the top. This occurs just in the test since some sorting done in the original functionality when retrieving the marshaller list is not present in test code -  but once sorting and correct marshallers are used, date test fails when comparing the date before marshalling and the date after having gone through being marshalled and unmarshalled.

      Problem is: only date seconds are marshalled into protobuf Timestamp - not the millisecond part => after marshalling/unmarshalling process that millisecond part is missing causing the two dates - the original and the processed - not to be the same

      Question: what to fix: test comparison (if the marshalling only for seconds is what is wanted) or ProtobufDateMarshallerStrategy.marshall() function to also take the milliseconds into account?

      Attachments

        Activity

          People

            elguardian@gmail.com Enrique González Martínez (Inactive)
            uegozi@redhat.com Ute Egozi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: