Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23383

FlinkEnvironmentContext#setUp is called twice

    XMLWordPrintableJSON

Details

    Description

      Several benchmarks subclass the FlinkEnvironmentContext and override #setUp, like this:

      @Setup
      public void setUp() throws Exception {
          super.setUp();
          // do more stuff
      }
      

      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.

      Attachments

        Issue Links

          Activity

            People

              chesnay Chesnay Schepler
              chesnay Chesnay Schepler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: