elephant-bird icon indicating copy to clipboard operation
elephant-bird copied to clipboard

TestThriftToPig for Elephantbird piggybank getting failed

Open SonaliShrivastava opened this issue 8 years ago • 5 comments

Hi All,

I am trying to port Elephant Bird Stable Release "2.2.3" on RHEL 7.2 ppc64le using open jdk 1.8 Got success in running ant, ant compile, ant resolve, ant jar and for other targets too except got failure for ant test.

It gives me Test Failure in below line: [junit] Running com.twitter.elephantbird.pig.piggybank.TestThriftToPig [junit] Tests run: 16, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.081 sec [junit] TEST com.twitter.elephantbird.pig.piggybank.TestThriftToPig FAILED

By debugging failures, I see, it is failing on line no. 160 i.e. assertEquals("{(1,0,34,27000,16777216,6000000000,3.141592653589793,JSON THIS! "^A," + ooe.zomg_unicode + ",0,base64,{(1),(2),(3)},{(1),(2),(3)},{(1),(2),(3)}),(1,0,35,27000,16777216,6000000000,3.141592653589793,JSON THIS! "^A," + ooe.zomg_unicode + ",0,base64,{(1),(2),(3)},{(1),(2),(3)},{(1),(2),(3)})}-{({}),({(and a one),(and a two)}),({(then a one, two),(three!),(FOUR!!)})}-{zero={}, three={}, two={(1,Wait.),(2,What?)}}", (toTuple(type, hm).toDelimitedString("-")));

For debugging purpose, i have added logs and could get below clarity for string comparison failing as a result they are not equal and so assert error, following are details log i printed: FAILED expected:<...,{(1),(2),(3)})}-{({[}),({(and a one),(and a two)}),({(then a one, two),(three!),(FOUR!!)})}-{zero={}, three={}, two={(1,Wait.),(2,What?)]}}> but was:<...,{(1),(2),(3)})}-{({[(and a one),(and a two)}),({}),({(then a one, two),(three!),(FOUR!!)})}-{zero={}, two={(1,Wait.),(2,What?)}, three={]}}> junit.framework.AssertionFailedError.

If I comment above line, this happens similar to line below too: assertEquals("(bob,jenkins),42,[email protected],{(415-555-5555,HOME)}", toTuple(type, person).toDelimitedString(","));

as well as also for line i.e. assertTrue( // the order of elements in map could vary because of HashMap tupleString.equals("(bob,jenkins)-{MOBILE=650-555-5555, WORK=415-555-5555, HOME=408-555-5555}") || tupleString.equals("(bob,jenkins)-{MOBILE=650-555-5555, HOME=408-555-5555, WORK=415-555-5555}"));

When i comment all 3 lines above, test passes for all other modules of it and also for other projects of elephant-bird.

It seems this is coding issue. @Team: Can you please let me know for reason it is failing beside other all test are passing except failing for com.twitter.elephantbird.pig.piggybank.TestThriftToPig.

Thanks & Regards, Sonali Shrivastava

SonaliShrivastava avatar Jun 15 '16 06:06 SonaliShrivastava

Dear Team, Any comment on this issue?

jagadale avatar Jun 20 '16 06:06 jagadale

Hello Team,

I have build elephant-bird for "RHEL7.1 x86-64" too and could find same above error i.e. Running com.twitter.elephantbird.pig.piggybank.TestThriftToPig [junit] Tests run: 16, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.315 sec [junit] TEST com.twitter.elephantbird.pig.piggybank.TestThriftToPig FAILED

It seems to be coding error as explained above. Can you please let us know for the reason it is failing? Waiting for your reply.

Thanks & Regards, Sonali Shrivastava

SonaliShrivastava avatar Jun 22 '16 10:06 SonaliShrivastava

@SonaliShrivastava Sorry, elephant-bird-pig is not actively being developed. And 2.2.3 is a pretty old version (May 2012). We are currently on 4.14. Any reason you're using that version?

On the latest version, you should be able to run the release.sh script to run all the tests. See: https://github.com/twitter/elephant-bird/blob/master/release.sh#L201 https://github.com/twitter/elephant-bird/wiki/Release-Howto#running-with-vagrant

rubanm avatar Jun 22 '16 15:06 rubanm

HI Rubanm,

Yes 2.2.3 is stable release and so have gone for it. Thanks for reply. As a reason for still development going on it and hence the issue for ppc64le and x86-64 too.

Thanks & Regards, Sonali Shrivastava

SonaliShrivastava avatar Jun 27 '16 08:06 SonaliShrivastava

@SonaliShrivastava I'm not sure where 2.2.3 is coming from, but the current release is 4.14 Do we have some old documentation claiming 2.2.3 is the stable release?

isnotinvain avatar Jul 08 '16 04:07 isnotinvain