Skip to content

Commit

Permalink
3.x Make OciMetricsDataTest.beforeEach public (#7328)
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain1653 authored Jan 2, 2024
1 parent d3f7edf commit aad1d2c
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import io.helidon.metrics.api.RegistryFactory;

import org.eclipse.microprofile.metrics.MetricRegistry.Type;

import com.oracle.bmc.monitoring.model.MetricDataDetails;

public class OciMetricsDataTest {
class OciMetricsDataTest {
private final OciMetricsSupport.NameFormatter nameFormatter = new OciMetricsSupport.NameFormatter() { };
private final Type[] types = {Type.BASE, Type.VENDOR, Type.APPLICATION};
private final String dimensionScopeName = "scope";
Expand All @@ -47,21 +46,15 @@ public class OciMetricsDataTest {
private final MetricRegistry appMetricRegistry = rf.getRegistry(Type.APPLICATION);

@BeforeEach
private void beforeEach() {
// clear all registry
void clearAllRegistry() {
for (Type type: types) {
MetricRegistry metricRegistry = rf.getRegistry(type);
metricRegistry.removeMatching(new MetricFilter() {
@Override
public boolean matches(MetricID metricID, Metric metric) {
return true;
}
});
metricRegistry.removeMatching(MetricFilter.ALL);
}
}

@Test
public void testMetricRegistries() {
void testMetricRegistries() {
String counterName = "DummyCounter";
String meterName = "DummyMeter";
String timerName = "DummyTimer";
Expand Down Expand Up @@ -96,7 +89,7 @@ public void testMetricRegistries() {
}

@Test
public void testOciMonitoringParameters() {
void testOciMonitoringParameters() {
String compartmentId = "dummy.compartmentId";
String namespace = "dummy-namespace";
String resourceGroup = "dummy_resourceGroup";
Expand All @@ -114,7 +107,7 @@ public void testOciMonitoringParameters() {
}

@Test
public void testDimensions() {
void testDimensions() {
String dummyTagName = "DummyTag";
String dummyTagValue = "DummyValue";

Expand Down

0 comments on commit aad1d2c

Please sign in to comment.