Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-1728

PutKafka tests need to explicitly set charsets to be more portable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0, 0.6.1
    • Component/s: None
    • Labels:
      None

      Description

      Tests run: 6, Failures: 3, Errors: 0, Skipped: 2, Time elapsed: 26.691 sec <<< FAILURE! - in org.apache.nifi.processors.kafka.TestPutK afka
      testComplexRightPartialDelimitedMessages(org.apache.nifi.processors.kafka.TestPutKafka) Time elapsed: 5.276 sec <<< FAILURE!
      org.junit.ComparisonFailure: expected:<Hello World[]> but was:<Hello World[?<?WILDSTUFF?>?Goodbye?<?WILDSTUFF?>?I Mean IT!?<?WILDSTUFF ?>]>
      at org.junit.Assert.assertEquals(Assert.java:115)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.nifi.processors.kafka.TestPutKafka.testComplexRightPartialDelimitedMessages(TestPutKafka.java:206)

      testComplexPartialMatchDelimitedMessages(org.apache.nifi.processors.kafka.TestPutKafka) Time elapsed: 5.269 sec <<< FAILURE!
      org.junit.ComparisonFailure: expected:<Hello World[]> but was:<Hello World[?<?WILDSTUFF?>?Goodbye?<?WILDBOOMSTUFF?>?]>
      at org.junit.Assert.assertEquals(Assert.java:115)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.nifi.processors.kafka.TestPutKafka.testComplexPartialMatchDelimitedMessages(TestPutKafka.java:249)

      testComplexLeftPartialDelimitedMessages(org.apache.nifi.processors.kafka.TestPutKafka) Time elapsed: 5.33 sec <<< FAILURE!
      org.junit.ComparisonFailure: expected:<Hello World[]> but was:<Hello World[?<?WILDSTUFF?>?Goodbye?<?WILDSTUFF?>?I Mean IT!?<?WILDSTUFF ?>?<?WILDSTUFF?>?]>
      at org.junit.Assert.assertEquals(Assert.java:115)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.nifi.processors.kafka.TestPutKafka.testComplexLeftPartialDelimitedMessages(TestPutKafka.java:227)

      Results :

      Failed tests:
      KafkaPublisherTest.validateWithMultiByteCharacters:196 expected:<[?THIS IS MY NEW TEXT.?]IT HAS A NEWLINE.> but was:<[?THIS IS MY NE W TEXT.?]IT HAS A NEWLINE.>
      TestPutKafka.testComplexLeftPartialDelimitedMessages:227 expected:<Hello World[]> but was:<Hello World[?<?WILDSTUFF?>?Goodbye?<?WILD STUFF?>?I Mean IT!?<?WILDSTUFF?>?<?WILDSTUFF?>?]>
      TestPutKafka.testComplexPartialMatchDelimitedMessages:249 expected:<Hello World[]> but was:<Hello World[?<?WILDSTUFF?>?Goodbye?<?WIL DBOOMSTUFF?>?]>
      TestPutKafka.testComplexRightPartialDelimitedMessages:206 expected:<Hello World[]> but was:<Hello World[?<?WILDSTUFF?>?Goodbye?<?WIL DSTUFF?>?I Mean IT!?<?WILDSTUFF?>]>

      it appears we must set the charset to be used for input and we must set the charset to be used for comparison of all output. WIthout it the default charset is used and if the characters don't map cleanly then demarcation won't hit as it should.

        Attachments

          Activity

            People

            • Assignee:
              aldrin Aldrin Piri
              Reporter:
              joewitt Joseph Witt
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: