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


##########
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:
   Thank you for the review, I've renamed this and made `DownloadCache` 
package-private.



-- 
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