From e60312c1bd3d77b3faffb937e62624a5bdae7b2e Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Sun, 25 Jul 2010 03:48:58 +0000 Subject: [PATCH] HBASE-2815 not able to run the test suite in background because TestShell gets suspended on tty output git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@978973 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ src/main/ruby/shell/formatter.rb | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 953c79576e4..c0e83565ea5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -454,6 +454,8 @@ Release 0.21.0 - Unreleased becomes invalid (BenĂ´it Sigoure via Stack) HBASE-2876 HBase hbck: false positive error reported for parent regions that are in offline state in meta after a split + HBASE-2815 not able to run the test suite in background because TestShell + gets suspended on tty output (Alexey Kovyrin via Stack) IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/main/ruby/shell/formatter.rb b/src/main/ruby/shell/formatter.rb index ea91fe0e841..90ab45b749c 100644 --- a/src/main/ruby/shell/formatter.rb +++ b/src/main/ruby/shell/formatter.rb @@ -30,13 +30,9 @@ module Shell end def refresh_width() - @max_width = Java::jline.Terminal.getTerminal().getTerminalWidth() - - # the above doesn't work in some terminals - # (such as shell running within emacs) - if @max_width == 0 - @max_width = 100 - end + @max_width = Java::jline.Terminal.getTerminal().getTerminalWidth() if $stdout.tty? + # the above doesn't work in some terminals (such as shell running within emacs) + @max_width = 100 if @max_width.to_i.zero? end # Takes an output stream and a print width.