From 1f6317c6afa63f481e4b69d81f3b84187c031b73 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Tue, 11 Jun 2024 14:43:09 +0300 Subject: [PATCH] Remove image metrics integration tests As part of https://github.com/quarkusio/quarkus/issues/40076 is now implemented and we are gathering the necessary stats in a database there is no longer the need for these tests to exist. Note that automated alerting in case of regressions is still not setup but we now have a way to go back in time and see which (few) patches resulted in the regression, even if we don't spot it immediately. --- .../it/jpa/postgresql/ImageMetricsITCase.java | 17 ------------- .../23.0/image-metrics.properties | 21 ---------------- .../23.1/image-metrics.properties | 21 ---------------- .../it/jpa/postgresql/ImageMetricsITCase.java | 18 -------------- .../23.0/image-metrics.properties | 21 ---------------- .../23.1/image-metrics.properties | 21 ---------------- .../quarkus/it/main/ImageMetricsITCase.java | 17 ------------- .../23.0/image-metrics.properties | 21 ---------------- .../23.1/image-metrics.properties | 24 ------------------- .../NativeBuildOutputExtension.java | 3 +++ 10 files changed, 3 insertions(+), 181 deletions(-) delete mode 100644 integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java delete mode 100644 integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.0/image-metrics.properties delete mode 100644 integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.1/image-metrics.properties delete mode 100644 integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java delete mode 100644 integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.0/image-metrics.properties delete mode 100644 integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.1/image-metrics.properties delete mode 100644 integration-tests/main/src/test/java/io/quarkus/it/main/ImageMetricsITCase.java delete mode 100644 integration-tests/main/src/test/resources/image-metrics/23.0/image-metrics.properties delete mode 100644 integration-tests/main/src/test/resources/image-metrics/23.1/image-metrics.properties diff --git a/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java b/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java deleted file mode 100644 index 7928216825aaff..00000000000000 --- a/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.quarkus.it.jpa.postgresql; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import io.quarkus.test.junit.QuarkusIntegrationTest; -import io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension; - -@ExtendWith(NativeBuildOutputExtension.class) -@QuarkusIntegrationTest -public class ImageMetricsITCase { - @Test - public void verifyImageMetrics() { - NativeBuildOutputExtension buildOutput = new NativeBuildOutputExtension(); - buildOutput.verifyImageMetrics(); - } -} diff --git a/integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.0/image-metrics.properties b/integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.0/image-metrics.properties deleted file mode 100644 index 5968543202550e..00000000000000 --- a/integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.0/image-metrics.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Properties file used by ImageMetricsITCase -image_details.total_bytes=88215776 -image_details.total_bytes.tolerance=3 -analysis_results.types.reachable=20556 -analysis_results.types.reachable.tolerance=3 -analysis_results.methods.reachable=101602 -analysis_results.methods.reachable.tolerance=3 -analysis_results.fields.reachable=30176 -analysis_results.fields.reachable.tolerance=3 -analysis_results.types.reflection=6585 -analysis_results.types.reflection.tolerance=3 -analysis_results.methods.reflection=4556 -analysis_results.methods.reflection.tolerance=3 -analysis_results.fields.reflection=147 -analysis_results.fields.reflection.tolerance=3 -analysis_results.types.jni=63 -analysis_results.types.jni.tolerance=1 -analysis_results.methods.jni=55 -analysis_results.methods.jni.tolerance=1 -analysis_results.fields.jni=70 -analysis_results.fields.jni.tolerance=3 diff --git a/integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.1/image-metrics.properties b/integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.1/image-metrics.properties deleted file mode 100644 index 89afefa176b668..00000000000000 --- a/integration-tests/jpa-postgresql-withxml/src/test/resources/image-metrics/23.1/image-metrics.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Properties file used by ImageMetricsITCase -image_details.total_bytes=94415680 -image_details.total_bytes.tolerance=3 -analysis_results.types.reachable=20867 -analysis_results.types.reachable.tolerance=3 -analysis_results.methods.reachable=103028 -analysis_results.methods.reachable.tolerance=3 -analysis_results.fields.reachable=30098 -analysis_results.fields.reachable.tolerance=3 -analysis_results.types.reflection=6705 -analysis_results.types.reflection.tolerance=3 -analysis_results.methods.reflection=4551 -analysis_results.methods.reflection.tolerance=3 -analysis_results.fields.reflection=170 -analysis_results.fields.reflection.tolerance=3 -analysis_results.types.jni=61 -analysis_results.types.jni.tolerance=1 -analysis_results.methods.jni=55 -analysis_results.methods.jni.tolerance=1 -analysis_results.fields.jni=60 -analysis_results.fields.jni.tolerance=2 \ No newline at end of file diff --git a/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java b/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java deleted file mode 100644 index 7598509c8bb62e..00000000000000 --- a/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/ImageMetricsITCase.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.quarkus.it.jpa.postgresql; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import io.quarkus.test.junit.QuarkusIntegrationTest; -import io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension; - -@ExtendWith(NativeBuildOutputExtension.class) -@QuarkusIntegrationTest -public class ImageMetricsITCase { - - @Test - public void verifyImageMetrics() { - NativeBuildOutputExtension buildOutput = new NativeBuildOutputExtension(); - buildOutput.verifyImageMetrics(); - } -} diff --git a/integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.0/image-metrics.properties b/integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.0/image-metrics.properties deleted file mode 100644 index 440f53540d8a98..00000000000000 --- a/integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.0/image-metrics.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Properties file used by ImageMetricsITCase -image_details.total_bytes=79712248 -image_details.total_bytes.tolerance=3 -analysis_results.types.reachable=19625 -analysis_results.types.reachable.tolerance=3 -analysis_results.methods.reachable=97338 -analysis_results.methods.reachable.tolerance=3 -analysis_results.fields.reachable=27443 -analysis_results.fields.reachable.tolerance=3 -analysis_results.types.reflection=6128 -analysis_results.types.reflection.tolerance=3 -analysis_results.methods.reflection=4374 -analysis_results.methods.reflection.tolerance=3 -analysis_results.fields.reflection=176 -analysis_results.fields.reflection.tolerance=3 -analysis_results.types.jni=63 -analysis_results.types.jni.tolerance=1 -analysis_results.methods.jni=55 -analysis_results.methods.jni.tolerance=1 -analysis_results.fields.jni=70 -analysis_results.fields.jni.tolerance=3 diff --git a/integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.1/image-metrics.properties b/integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.1/image-metrics.properties deleted file mode 100644 index 94cb7d716f262e..00000000000000 --- a/integration-tests/jpa-postgresql/src/test/resources/image-metrics/23.1/image-metrics.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Properties file used by ImageMetricsITCase -image_details.total_bytes=85866808 -image_details.total_bytes.tolerance=3 -analysis_results.types.reachable=19853 -analysis_results.types.reachable.tolerance=3 -analysis_results.methods.reachable=98606 -analysis_results.methods.reachable.tolerance=3 -analysis_results.fields.reachable=27389 -analysis_results.fields.reachable.tolerance=3 -analysis_results.types.reflection=6232 -analysis_results.types.reflection.tolerance=3 -analysis_results.methods.reflection=4367 -analysis_results.methods.reflection.tolerance=3 -analysis_results.fields.reflection=201 -analysis_results.fields.reflection.tolerance=3 -analysis_results.types.jni=61 -analysis_results.types.jni.tolerance=1 -analysis_results.methods.jni=55 -analysis_results.methods.jni.tolerance=1 -analysis_results.fields.jni=60 -analysis_results.fields.jni.tolerance=2 \ No newline at end of file diff --git a/integration-tests/main/src/test/java/io/quarkus/it/main/ImageMetricsITCase.java b/integration-tests/main/src/test/java/io/quarkus/it/main/ImageMetricsITCase.java deleted file mode 100644 index 527b3d840c87d7..00000000000000 --- a/integration-tests/main/src/test/java/io/quarkus/it/main/ImageMetricsITCase.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.quarkus.it.main; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import io.quarkus.test.junit.QuarkusIntegrationTest; -import io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension; - -@ExtendWith(NativeBuildOutputExtension.class) -@QuarkusIntegrationTest -public class ImageMetricsITCase { - @Test - public void verifyImageMetrics() { - NativeBuildOutputExtension buildOutput = new NativeBuildOutputExtension(); - buildOutput.verifyImageMetrics(); - } -} diff --git a/integration-tests/main/src/test/resources/image-metrics/23.0/image-metrics.properties b/integration-tests/main/src/test/resources/image-metrics/23.0/image-metrics.properties deleted file mode 100644 index 2da98333835da4..00000000000000 --- a/integration-tests/main/src/test/resources/image-metrics/23.0/image-metrics.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Properties file used by ImageMetricsITCase -image_details.total_bytes=138255480 -image_details.total_bytes.tolerance=3 -analysis_results.types.reachable=29952 -analysis_results.types.reachable.tolerance=3 -analysis_results.methods.reachable=149162 -analysis_results.methods.reachable.tolerance=3 -analysis_results.fields.reachable=44103 -analysis_results.fields.reachable.tolerance=3 -analysis_results.types.reflection=8927 -analysis_results.types.reflection.tolerance=3 -analysis_results.methods.reflection=7136 -analysis_results.methods.reflection.tolerance=3 -analysis_results.fields.reflection=445 -analysis_results.fields.reflection.tolerance=3 -analysis_results.types.jni=64 -analysis_results.types.jni.tolerance=1 -analysis_results.methods.jni=55 -analysis_results.methods.jni.tolerance=1 -analysis_results.fields.jni=70 -analysis_results.fields.jni.tolerance=1 diff --git a/integration-tests/main/src/test/resources/image-metrics/23.1/image-metrics.properties b/integration-tests/main/src/test/resources/image-metrics/23.1/image-metrics.properties deleted file mode 100644 index 1afdbb1d431fdc..00000000000000 --- a/integration-tests/main/src/test/resources/image-metrics/23.1/image-metrics.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Properties file used by ImageMetricsITCase -image_details.total_bytes=147268552 -image_details.total_bytes.tolerance=3 -# TODO: Switch to using analysis_results.types.reachable key once we drop support for GraalVM 22.3.0 -analysis_results.classes.reachable=30415 -analysis_results.classes.reachable.tolerance=3 -analysis_results.methods.reachable=151296 -analysis_results.methods.reachable.tolerance=3 -analysis_results.fields.reachable=44325 -analysis_results.fields.reachable.tolerance=3 -# TODO: Switch to using analysis_results.types.reflection key once we drop support for GraalVM 22.3.0 -analysis_results.classes.reflection=9118 -analysis_results.classes.reflection.tolerance=3 -analysis_results.methods.reflection=7688 -analysis_results.methods.reflection.tolerance=3 -analysis_results.fields.reflection=496 -analysis_results.fields.reflection.tolerance=3 -# TODO: Switch to using analysis_results.types.jni key once we drop support for GraalVM 22.3.0 -analysis_results.classes.jni=62 -analysis_results.classes.jni.tolerance=1 -analysis_results.methods.jni=55 -analysis_results.methods.jni.tolerance=1 -analysis_results.fields.jni=62 -analysis_results.fields.jni.tolerance=2 diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/NativeBuildOutputExtension.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/NativeBuildOutputExtension.java index 8d73517a359d4c..668cde1d271534 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/NativeBuildOutputExtension.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/NativeBuildOutputExtension.java @@ -28,7 +28,10 @@ * For detailed information and explanations on the build output, visit * the upstream GraalVM * documentation. + * + * @deprecated This extension is no longer used by core Quarkus and will eventually be removed. */ +@Deprecated public class NativeBuildOutputExtension implements BeforeAllCallback { private static final String IMAGE_METRICS_TEST_PROPERTIES = "image-metrics.properties";