Todd Lipcon has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/9592 )

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
Reviewed-on: http://gerrit.cloudera.org:8080/9592
Reviewed-by: Adar Dembo <a...@cloudera.com>
Tested-by: Todd Lipcon <t...@apache.org>
---
M src/kudu/master/master-test.cc
M src/kudu/util/test_util.cc
2 files changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Todd Lipcon: Verified

--
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: merged
Gerrit-Change-Id: Ic68826f652c7aefce1314d9e3481b11666f2699f
Gerrit-Change-Number: 9592
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to