dimas-b commented on code in PR #4792:
URL: https://github.com/apache/polaris/pull/4792#discussion_r3428619874
##########
runtime/service/src/test/java/org/apache/polaris/service/metrics/MetricsTestBase.java:
##########
@@ -28,42 +27,59 @@
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
-import org.apache.polaris.service.test.PolarisIntegrationTestFixture;
-import org.apache.polaris.service.test.PolarisIntegrationTestHelper;
+import org.apache.polaris.service.it.env.ClientPrincipal;
+import org.apache.polaris.service.it.env.PolarisApiEndpoints;
+import org.apache.polaris.service.it.env.PolarisClient;
+import org.apache.polaris.service.it.ext.PolarisIntegrationTestExtension;
+import org.apache.polaris.service.ratelimiter.MockRateLimiter;
import org.apache.polaris.service.test.TestEnvironment;
import org.apache.polaris.service.test.TestEnvironmentExtension;
import org.apache.polaris.service.test.TestMetricsUtil;
import org.awaitility.Awaitility;
import org.hawkular.agent.prometheus.types.MetricFamily;
import org.hawkular.agent.prometheus.types.Summary;
+import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@ExtendWith(TestEnvironmentExtension.class)
+@ExtendWith(PolarisIntegrationTestExtension.class)
public abstract class MetricsTestBase {
private static final int ERROR_CODE =
Response.Status.NOT_FOUND.getStatusCode();
- private static final String ENDPOINT = "api/management/v1/principals";
private static final String API_METRIC_NAME =
"polaris_principals_getPrincipal_seconds";
private static final String HTTP_METRIC_NAME =
"http_server_requests_seconds";
- @Inject PolarisIntegrationTestHelper helper;
@Inject MeterRegistry registry;
@Inject MetricsConfiguration metricsConfiguration;
private TestEnvironment testEnv;
- private PolarisIntegrationTestFixture fixture;
+ private PolarisApiEndpoints endpoints;
+ private PolarisClient client;
+ private ClientPrincipal principal;
+ private String adminToken;
@BeforeAll
- public void createFixture(TestEnvironment testEnv, TestInfo testInfo) {
+ public void setUp(
+ TestEnvironment testEnv, PolarisApiEndpoints endpoints, ClientPrincipal
principal) {
Review Comment:
@andrew4699 used to be involved in that code... but not active anymore... I
think a notice to `dev` would be nice in case people still rely on that class
downstream.
--
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]