flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8955) Port ClassLoaderITCase to flip6
Date Sat, 14 Apr 2018 00:06:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16438119#comment-16438119
] 

ASF GitHub Bot commented on FLINK-8955:
---------------------------------------

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

    https://github.com/apache/flink/pull/5780#discussion_r181533175
  
    --- Diff: flink-tests/src/test/java/org/apache/flink/test/classloading/ClassLoaderITCase.java
---
    @@ -196,21 +188,23 @@ public void testCheckpointedStreamingClassloaderJobWithCustomClassLoader()
throw
     		// the test also ensures that user specific exceptions are serializable between JobManager
<--> JobClient.
     		PackagedProgram streamingCheckpointedProg = new PackagedProgram(new File(STREAMING_CHECKPOINTED_PROG_JAR_FILE));
     
    -		TestStreamEnvironment.setAsContext(
    -			testCluster,
    +		TestEnvironment.setAsContext(
    +			MINI_CLUSTER_RESOURCE,
     			parallelism,
     			Collections.singleton(new Path(STREAMING_CHECKPOINTED_PROG_JAR_FILE)),
     			Collections.<URL>emptyList());
     
    -		// Program should terminate with a 'SuccessException':
    -		// we can not access the SuccessException here when executing the tests with maven,
because its not available in the jar.
    -		expectedException.expectCause(
    -			Matchers.<Throwable>hasProperty("cause",
    -				hasProperty("class",
    -					hasProperty("canonicalName", equalTo(
    -						"org.apache.flink.test.classloading.jar.CheckpointedStreamingProgram.SuccessException")))));
    -
    -		streamingCheckpointedProg.invokeInteractiveModeForExecution();
    +		try {
    +			streamingCheckpointedProg.invokeInteractiveModeForExecution();
    +		} catch (Exception e) {
    +			// Program should terminate with a 'SuccessException':
    +			// we can not access the SuccessException here when executing the tests with maven,
because its not available in the jar.
    +			Optional<Throwable> expectedCause = ExceptionUtils.findThrowable(e,
    +				candidate -> candidate.getClass().getCanonicalName().equals("org.apache.flink.test.classloading.jar.CheckpointedStreamingProgram.SuccessException"));
    --- End diff --
    
    Technically that shouldn't be possible. The exception class is part of the user-jar which
is not on the classpath of the test.


> Port ClassLoaderITCase to flip6
> -------------------------------
>
>                 Key: FLINK-8955
>                 URL: https://issues.apache.org/jira/browse/FLINK-8955
>             Project: Flink
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 1.5.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Blocker
>             Fix For: 1.5.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message