32
32
import io .helidon .metrics .Registry ;
33
33
import io .helidon .metrics .api .RegistryFactory ;
34
34
35
- import org .eclipse .microprofile .metrics .MetricRegistry .Type ;
36
-
37
35
import com .oracle .bmc .monitoring .model .MetricDataDetails ;
38
36
39
- public class OciMetricsDataTest {
37
+ class OciMetricsDataTest {
40
38
private final OciMetricsSupport .NameFormatter nameFormatter = new OciMetricsSupport .NameFormatter () { };
41
39
private final String [] types = {Registry .BASE_SCOPE , Registry .VENDOR_SCOPE , Registry .APPLICATION_SCOPE };
42
40
private final String dimensionScopeName = "scope" ;
@@ -47,21 +45,15 @@ public class OciMetricsDataTest {
47
45
private final MetricRegistry appMetricRegistry = rf .getRegistry (Registry .APPLICATION_SCOPE );
48
46
49
47
@ BeforeEach
50
- private void beforeEach () {
51
- // clear all registry
48
+ void clearAllRegistry () {
52
49
for (String type : types ) {
53
50
MetricRegistry metricRegistry = rf .getRegistry (type );
54
- metricRegistry .removeMatching (new MetricFilter () {
55
- @ Override
56
- public boolean matches (MetricID metricID , Metric metric ) {
57
- return true ;
58
- }
59
- });
51
+ metricRegistry .removeMatching (MetricFilter .ALL );
60
52
}
61
53
}
62
54
63
55
@ Test
64
- public void testMetricRegistries () {
56
+ void testMetricRegistries () {
65
57
String counterName = "DummyCounter" ;
66
58
String timerName = "DummyTimer" ;
67
59
@@ -91,7 +83,7 @@ public void testMetricRegistries() {
91
83
}
92
84
93
85
@ Test
94
- public void testOciMonitoringParameters () {
86
+ void testOciMonitoringParameters () {
95
87
String compartmentId = "dummy.compartmentId" ;
96
88
String namespace = "dummy-namespace" ;
97
89
String resourceGroup = "dummy_resourceGroup" ;
@@ -109,7 +101,7 @@ public void testOciMonitoringParameters() {
109
101
}
110
102
111
103
@ Test
112
- public void testDimensions () {
104
+ void testDimensions () {
113
105
String dummyTagName = "DummyTag" ;
114
106
String dummyTagValue = "DummyValue" ;
115
107
0 commit comments