Joseph Witt created NIFI-1728:
---------------------------------

             Summary: PutKafka tests need to explicitly set charsets to be more 
portable
                 Key: NIFI-1728
                 URL: https://issues.apache.org/jira/browse/NIFI-1728
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Joseph Witt
             Fix For: 0.6.1


{quote}
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?>]>
{quote}

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.



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

Reply via email to