Skip to content

Commit

Permalink
Merge pull request #1684 from davidmarin/check-cluster-every
Browse files Browse the repository at this point in the history
--check-cluster-every takes a float, not a string
  • Loading branch information
David Marin committed Oct 12, 2017
2 parents afc0d51 + dc77618 commit 801ffff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions mrjob/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ def __call__(self, parser, namespace, value, option_string=None):
(['--check-cluster-every'], dict(
help=('How often (in seconds) to check status of your'
' job/cluster'),
type=float,
)),
],
),
Expand Down
11 changes: 11 additions & 0 deletions tests/test_emr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5438,3 +5438,14 @@ def test_other_uri(self):
# no way to check hdfs://, ignore
with job.make_runner() as runner:
self.assertRaises(StopIteration, runner.run)


class CheckClusterEveryTestCase(MockBoto3TestCase):

def test_command_line_option(self):
# regression test for #1664
job = MRTwoStepJob(['-r', 'emr', '--check-cluster-every', '5.0'])
job.sandbox()

with job.make_runner() as runner:
runner.run()

0 comments on commit 801ffff

Please sign in to comment.