You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/05/07 02:59:04 UTC
[jira] [Commented] (FLINK-6397) MultipleProgramsTestBase does not
reset ContextEnvironment
[ https://issues.apache.org/jira/browse/FLINK-6397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15999660#comment-15999660 ]
ASF GitHub Bot commented on FLINK-6397:
---------------------------------------
Github user ifndef-SleePy commented on a diff in the pull request:
https://github.com/apache/flink/pull/3810#discussion_r115133175
--- Diff: flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/test/util/MultipleProgramsTestBase.java ---
@@ -80,29 +80,36 @@
protected final TestExecutionMode mode;
-
+ private TestEnvironment testEnvironment;
+
+ private CollectionTestEnvironment collectionTestEnvironment;
+
public MultipleProgramsTestBase(TestExecutionMode mode) {
this.mode = mode;
-
+
switch(mode){
case CLUSTER:
- new TestEnvironment(cluster, 4).setAsContext();
+ testEnvironment = new TestEnvironment(cluster, 4);
--- End diff --
@zentol I just found that I can not move these codes into \@Before method, because it will not work with JUnit Parameterized. I proposal to keep these codes in constructor. What do you think?
> MultipleProgramsTestBase does not reset ContextEnvironment
> ----------------------------------------------------------
>
> Key: FLINK-6397
> URL: https://issues.apache.org/jira/browse/FLINK-6397
> Project: Flink
> Issue Type: Bug
> Components: Tests
> Affects Versions: 1.3.0
> Reporter: Chesnay Schepler
> Assignee: Biao Liu
>
> The MultipleProgramsTestBase sets a new TestEnvironment as a context environment but never explicitly unsets it, which can result subsequent tests categorically failing.
> The CustomDistributionITCase doesn't unset the context either; and some streaming test that i haven't quite nailed down yet.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)