cwimmer/hadoop-admin — Issue #4: Improve code coverage for unit tests
Author: cwimmer
Created: 2012-03-05 02:07:58+00:00
State: open

Currently no testing on these subs:

datanode_dead_list
datanode_decom_list
tasktracker_blacklist_list
tasktracker_graylist_list
gather_nn_jmx
gather_jt_jmx
gather_rm_jmx

Branch coverage is also horrible:

line	%	coverage	branch
106	100	T	F	if ($self->has_resourcemanager and $self->has_jobtracker)
111	0	T	F	if (defined $self->get_socksproxy)
115	0	T	F	if (defined $self->_test_namenodeinfo) { }
119	0	T	F	unless open my $fh, '<', $self->_test_namenodeinfo
125	0	T	F	if (defined $self->get_namenode)
130	0	T	F	if (defined $self->_test_jobtrackerinfo) { }
134	0	T	F	unless open my $fh, '<', $self->_test_jobtrackerinfo
140	0	T	F	if (defined $self->get_jobtracker)
146	0	T	F	if (defined $self->_test_resourcemanagerinfo) { }
150	0	T	F	unless open my $fh, '<', $self->_test_resourcemanagerinfo
156	0	T	F	if (defined $self->get_resourcemanager)
221	0	T	F	if ($bean eq 'NameNodeInfo')
226	0	T	F	if (not $response->is_success)
239	50	T	F	if ($$bean{'name'} eq 'Hadoop:service=NameNode,name=NameNodeInfo')
255	0	T	F	if ($bean eq 'JobTrackerInfo')
260	0	T	F	if (not $response->is_success)
277	50	T	F	if ($$bean{'name'} eq 'Hadoop:service=JobTracker,name=JobTrackerInfo')
289	0	T	F	if ($bean eq 'RMNMInfo')
294	0	T	F	if (not $response->is_success)
310	50	T	F	if ($$bean{'name'} eq 'Hadoop:service=ResourceManager,name=RMNMInfo')