Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2289 Support Java 11
  3. AVRO-2290

TestSpecificLogicalTypes.testRecordWithJsr310LogicalTypes breaks on Java 11

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.9.0
    • java
    • None

    Description

      Java 11 has nano-second precision so the test breaks, the test should now detect this and adapt accordingly.

      [ERROR] testRecordWithJsr310LogicalTypes(org.apache.avro.specific.TestSpecificLo
      gicalTypes)  Time elapsed: 0.24 s  <<< FAILURE!
      java.lang.AssertionError: Should match written record expected:<{"b": true, "i32
      ": 34, "i64": 35, "f32": 3.14, "f64": 3019.34, "s": null, "d": 2018-12-20, "t": 
      15:02:53.535103, "ts": 2018-12-20T14:02:53.535127Z, "dec": 123.45}> but was:<{"b
      ": true, "i32": 34, "i64": 35, "f32": 3.14, "f64": 3019.34, "s": null, "d": 2018
      -12-20, "t": 15:02:53.535, "ts": 2018-12-20T14:02:53.535Z, "dec": 123.45}>
              at org.apache.avro.specific.TestSpecificLogicalTypes.testRecordWithJsr31
      0LogicalTypes(TestSpecificLogicalTypes.java:132)
      
      [ERROR] testAbilityToReadJodaRecordWrittenAsJsr310Record(org.apache.avro.specifi
      c.TestSpecificLogicalTypes)  Time elapsed: 0.005 s  <<< FAILURE!
      java.lang.AssertionError: 
      
      Expected: is "15:02:53.639158"
           but: was "15:02:53.639"
              at org.apache.avro.specific.TestSpecificLogicalTypes.testAbilityToReadJo
      daRecordWrittenAsJsr310Record(TestSpecificLogicalTypes.java:204)
      

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            iemejia Ismaël Mejía
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: