flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl0u <...@git.apache.org>
Subject [GitHub] flink pull request #5689: [FLINK-4569][tests] Respect exceptions thrown in t...
Date Tue, 13 Mar 2018 13:49:21 GMT
Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5689#discussion_r174135885
  
    --- Diff: flink-tests/src/test/java/org/apache/flink/test/example/client/JobRetrievalITCase.java
---
    @@ -119,6 +121,11 @@ public void run() {
     		lock.release();
     
     		resumingThread.join();
    +
    +		Throwable exception = error.get();
    +		if (exception != null) {
    +			throw new AssertionError(exception);
    +		}
    --- End diff --
    
    Is this any different from using `Assert.assertNull(error.get())`? Not that it makes any
difference but just to know why you picked throwing the exception here. Personally I think
that the assertNull seems more explicit when you read the code and it is less verbose.


---

Mime
View raw message