adobe-research / libkafka

A C++ client library for Apache Kafka v0.8+. Also includes C API.
Apache License 2.0
89 stars 51 forks source link

Update ClientTest.cc #13

Open MattPD opened 9 years ago

MattPD commented 9 years ago

Seems that ASSERT_* versions are more appropriate than EXPECT_* here, given the following Google Test guideline:

Source: https://code.google.com/p/googletest/wiki/Primer#Assertions

This replaces EXPECT_* with ASSERT_* in the contexts where attempting to continue results in dereferencing a null pointer -- which is undefined behavior: https://stackoverflow.com/questions/6793262/why-dereferencing-a-null-pointer-is-undefined-behaviour

MattPD commented 9 years ago

This (i.e., commit 0c0cf85) fixed the segmentation faults (cf. Travis CI output for commit 5ea891a). The test suite is now able to finish -- remaining test failures seem attributable to connection timeouts, which may be local to the testing environment; @DavidTompkins / others, please advise :-)