[
https://issues.apache.org/jira/browse/FLINK-23383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chesnay Schepler closed FLINK-23383.
------------------------------------
Resolution: Fixed
benchmark-master: 5ccb6b2003e37a3574996e281e38dfdb0f4b101a
> 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
> Priority: Minor
> Labels: pull-request-available
>
> 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)