def _test_one_line(self): from py4j.protocol import Py4JJavaError job = MRSparKaboom(['-r', 'inline']) job.sandbox(stdin=BytesIO(b'line\n')) with job.make_runner() as runner: self.assertRaises(Py4JJavaError, runner.run)
def test_spark_job_failure(self): job = MRSparKaboom(['-r', 'inline']) job.sandbox(stdin=BytesIO(b'line\n')) from py4j.protocol import Py4JJavaError with job.make_runner() as runner: self.assertRaises(Py4JJavaError, runner.run)
def test_empty(self): # no lines means no KABOOM job = MRSparKaboom([]) job.sandbox() with job.make_runner() as runner: runner.run() self.assertEqual(sorted(to_lines(runner.cat_output())), [])
def test_spark_job_failure(self): job = MRSparKaboom(['-r', 'spark']) job.sandbox(stdin=BytesIO(b'line\n')) with job.make_runner() as runner: self.assertRaises(StepFailedException, runner.run)
def test_spark_job_failure(self): job = MRSparKaboom(['-r', 'local']) job.sandbox(stdin=BytesIO(b'line\n')) with job.make_runner() as runner: self.assertRaises(StepFailedException, runner.run)