You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (Jira)" <ji...@apache.org> on 2021/07/14 12:47:00 UTC
[jira] [Created] (FLINK-23383) FlinkEnvironmentContext#setUp is
called twice
Chesnay Schepler created FLINK-23383:
----------------------------------------
Summary: FlinkEnvironmentContext#setUp is called twice
Key: FLINK-23383
URL: https://issues.apache.org/jira/browse/FLINK-23383
Project: Flink
Issue Type: Bug
Components: Benchmarks
Reporter: Chesnay Schepler
Assignee: Chesnay Schepler
Several benchmarks subclass the FlinkEnvironmentContext and override #setUp, like this:
{code}
@Setup
public void setUp() throws Exception {
super.setUp();
// do more stuff
}
{code}
Because this method is also annotated with {{@Setup}}, both the overridden and super version will be called separately, and since the overridden once _also_ calls into super, then the super version is called twice.
This is not a problem right now, but it could result in leaks if we allocate a resource in super.setUp, because @TearDown would only be called once.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)