Hello Adar Dembo,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/9592

to review the following change.


Change subject: Fix tests leaving behind diagnostics logs
......................................................................

Fix tests leaving behind diagnostics logs

Prior to this patch, if tests are run with TEST_TMPDIR set, tests which
use an internal minicluster could leave behind a diagnostics log file.
The issue was the following:

- GLog has some code which defaults FLAGS_log_dir to the the
  $TEST_TMPDIR environment variable.
- Since we enabled the diagnosics log by default, this meant that
  minicluster servers would start logging into $TEST_TMPDIR directly
- Our test harness only takes care of cleaning up the test-case-specific
  directory rather than the top-level $TEST_TMPDIR

The fix here is to make our own test harness override FLAGS_log_dir to
point to the test-specific directory.

Tested by setting TEST_TMPDIR and running tablet_server-test. Before the
patch, it left some files behind. With the patch, it did not. I couldn't
write an easy automated test since the initialization of FLAGS_log_dir
happens during glog's static constructors.

Change-Id: Ic68826f652c7aefce1314d9e3481b11666f2699f
---
M src/kudu/master/master-test.cc
M src/kudu/util/test_util.cc
2 files changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/9592/1
--
To view, visit http://gerrit.cloudera.org:8080/9592
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic68826f652c7aefce1314d9e3481b11666f2699f
Gerrit-Change-Number: 9592
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>

Reply via email to