You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/07/02 17:38:10 UTC

[GitHub] flink pull request #4146: [FLINK-6008][blob] collection of BlobServer improv...

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4146#discussion_r125165594
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java ---
    @@ -92,6 +99,69 @@ public void testDeleteSingle() {
     			catch (IllegalStateException e) {
     				// expected
     			}
    +
    +			// delete a file directly on the server
    +			server.delete(key2);
    +			try {
    +				server.getURL(key2);
    +				fail("BLOB should have been deleted");
    +			}
    +			catch (IOException e) {
    +				// expected
    +			}
    +		}
    +		catch (Exception e) {
    +			e.printStackTrace();
    +			fail(e.getMessage());
    +		}
    --- End diff --
    
    Can we remove this and simply let the exception be thrown? I think catching an exception, printing the stack trace and then failing with the exception message is an anti-pattern.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---