Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-24559: Fix test logging initialization #8

Merged
merged 1 commit into from Jun 19, 2020

Conversation

bharathv
Copy link
Contributor

Split into two commits

  1. Moved test-util/* to mini-cluster-util*
  2. Implement a macro that is to be used by all tests. The macro adds
    the initialization that can be exploited by all the unit tests

Ex: GLOG_logtostderr=1 ./async-batch-rpc-test...

@bharathv
Copy link
Contributor Author

@joshelser @phrocker FYI

@bharathv
Copy link
Contributor Author

Rebased on top of my other patches. Had to make some small fixes to get the tests running.

Copy link
Contributor

@phrocker phrocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Only one minor comment but not really something I think that needs to change.

namespace hbase {
string TestUtil::get_exec_path() {
char result[ PATH_MAX ];
ssize_t count = readlink( "/proc/self/exe", result, PATH_MAX );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we can use boost::dll::program_location ( that's 1.61 + I think ) but that may be more cross platform compatible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I missed it, thanks. Switched to boost::dll::program_location for now and enforced min version to 1.6.1. That should be ok I guess

1. Moved test-util/* to mini-cluster-util*
2. Implement a macro that is to be used by all tests. The macro adds
the initialization that can be exploited by all the unit tests
3. Misc fixes for classpath resolution.
4. Enforces boost min version to 1.6.1 for using
boost::dll::program_location

Ex: GLOG_logtostderr=1 ./async-batch-rpc-test // logs to stderr
@bharathv bharathv merged commit 0e226eb into apache:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants