@Test @Category(NeedsRunner.class) public void testNoException() throws Exception { Pipeline p = pipelineWith(new CustomTestCoder(null, null, null, null, null)); p.run().waitUntilFinish(); }
@Ignore("DirectRunner doesn't decode coders so this test does not pass.") @Test @Category(NeedsRunner.class) public void testDeserializationNPException() throws Exception { Pipeline p = pipelineWith( new CustomTestCoder(null, null, null, NULL_POINTER_EXCEPTION, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.lang.NullPointerException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Test @Category(NeedsRunner.class) public void testSerializationIOException() throws Exception { Pipeline p = pipelineWith(new CustomTestCoder(null, null, IO_EXCEPTION, null, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.io.IOException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Test @Category(NeedsRunner.class) public void testDecodingNPException() throws Exception { Pipeline p = pipelineWith( new CustomTestCoder(NULL_POINTER_EXCEPTION, null, null, null, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.lang.NullPointerException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Test @Category(NeedsRunner.class) public void testEncodingIOException() throws Exception { Pipeline p = pipelineWith(new CustomTestCoder(null, IO_EXCEPTION, null, null, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.io.IOException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Test @Category(NeedsRunner.class) public void testDecodingIOException() throws Exception { Pipeline p = pipelineWith(new CustomTestCoder(IO_EXCEPTION, null, null, null, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.io.IOException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Ignore("DirectRunner doesn't decode coders so this test does not pass.") @Test @Category(NeedsRunner.class) public void testDeserializationIOException() throws Exception { Pipeline p = pipelineWith(new CustomTestCoder(null, null, null, IO_EXCEPTION, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.io.IOException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Test @Category(NeedsRunner.class) public void testEncodingNPException() throws Exception { Pipeline p = pipelineWith( new CustomTestCoder(null, NULL_POINTER_EXCEPTION, null, null, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.lang.NullPointerException: Super Unique Message!!!")); p.run().waitUntilFinish(); }
@Test @Category(NeedsRunner.class) public void testSerializationNPException() throws Exception { Pipeline p = pipelineWith( new CustomTestCoder(null, null, NULL_POINTER_EXCEPTION, null, EXCEPTION_MESSAGE)); thrown.expect(Exception.class); thrown.expect(new ExceptionMatcher("java.lang.NullPointerException: Super Unique Message!!!")); p.run().waitUntilFinish(); }