davidradl commented on code in PR #28040:
URL: https://github.com/apache/flink/pull/28040#discussion_r3187547909


##########
flink-end-to-end-tests/flink-metrics-reporter-prometheus-test/src/test/java/org/apache/flink/metrics/prometheus/tests/PrometheusReporterEndToEndITCase.java:
##########
@@ -137,18 +141,22 @@ public static Collection<TestParams> testParameters() {
                         }));
     }
 
-    @Rule public final FlinkResource dist;
+    @RegisterExtension private final FlinkResourceExtension dist;
 
-    public PrometheusReporterEndToEndITCase(TestParams params) {
+    PrometheusReporterEndToEndITCase(TestParams params) {
         final FlinkResourceSetup.FlinkResourceSetupBuilder builder = 
FlinkResourceSetup.builder();
         params.getBuilderSetup().accept(builder);
         builder.addConfiguration(getFlinkConfig());
-        dist = new 
LocalStandaloneFlinkResourceFactory().create(builder.build());
+        dist =
+                new FlinkResourceExtension(
+                        new 
LocalStandaloneFlinkResourceFactory().create(builder.build()));
     }
 
-    @Rule public final TemporaryFolder tmp = new TemporaryFolder();
+    @TempDir private Path tmp;
 
-    @Rule public final DownloadCache downloadCache = DownloadCache.get();
+    @RegisterExtension
+    private final DownloadCacheExtension downloadCache =

Review Comment:
    I suggest the variable name is downloadCacheExtension. Leaving as 
downloadCache is confusing.
   Also if we are now using the Extension, can we make DownloadCache private to 
the DownloadCacheExtension, so no-one can use it apart from via the extension?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to