[ https://issues.apache.org/jira/browse/BEAM-6005?focusedWorklogId=163510&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-163510 ]
ASF GitHub Bot logged work on BEAM-6005: ---------------------------------------- Author: ASF GitHub Bot Created on: 07/Nov/18 17:25 Start Date: 07/Nov/18 17:25 Worklog Time Spent: 10m Work Description: supercclank commented on a change in pull request #6923: [BEAM-6005] PCollectionCustomCoderTest updates to fix test to actually function. URL: https://github.com/apache/beam/pull/6923#discussion_r231599920 ########## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/coders/PCollectionCustomCoderTest.java ########## @@ -148,104 +161,179 @@ private void throwIfPresent(String exceptionClassName) throws IOException { @Test @Category(NeedsRunner.class) public void testDecodingIOException() throws Exception { - thrown.expect(Exception.class); - thrown.expectCause(instanceOf(IOException.class)); Pipeline p = - runPipelineWith(new CustomTestCoder(IO_EXCEPTION, null, null, null, EXCEPTION_MESSAGE)); + 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(); } @Test @Category(NeedsRunner.class) public void testDecodingNPException() throws Exception { - thrown.expect(RuntimeException.class); - thrown.expectMessage("java.lang.NullPointerException: Super Unique Message!!!"); - Pipeline p = - runPipelineWith( + pipelineWith( new CustomTestCoder(NULL_POINTER_EXCEPTION, null, null, null, EXCEPTION_MESSAGE)); + thrown.expect(Exception.class); Review comment: Was the widening of RuntimeException.class to Exception.class intended? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 163510) Time Spent: 40m (was: 0.5h) > PCollectionCustomCoderTest passes spuriously. > --------------------------------------------- > > Key: BEAM-6005 > URL: https://issues.apache.org/jira/browse/BEAM-6005 > Project: Beam > Issue Type: Bug > Components: testing > Reporter: Jason Kuster > Assignee: Jason Kuster > Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > The test assertions trigger before the coder is used on the actual runner. -- This message was sent by Atlassian JIRA (v7.6.3#76005)