Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.rest; |
| 2 | |
| 3 | import com.codahale.metrics.Gauge; |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 4 | import net.onrc.onos.core.metrics.OnosMetrics; |
| 5 | import org.json.JSONArray; |
| 6 | import org.json.JSONException; |
| 7 | import org.json.JSONObject; |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 8 | import org.junit.Before; |
| 9 | import org.junit.Test; |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 10 | import org.restlet.resource.ClientResource; |
| 11 | |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 12 | import static org.hamcrest.MatcherAssert.assertThat; |
| 13 | import static org.hamcrest.Matchers.equalTo; |
| 14 | import static org.hamcrest.Matchers.is; |
| 15 | import static org.hamcrest.Matchers.notNullValue; |
| 16 | |
| 17 | /** |
| 18 | * Unit tests for filtering REST APIs for Timer Metrics. |
| 19 | */ |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 20 | public class TestRestMetricsFilters extends TestRestMetrics { |
| 21 | |
| 22 | /** |
| 23 | * Create the web server and mocks required for |
| 24 | * all of the tests. |
| 25 | */ |
| 26 | @Before |
| 27 | @SuppressWarnings("ununsed") |
| 28 | public void beforeTest() { |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 29 | // Make some test data |
| 30 | createMetrics(); |
| 31 | } |
| 32 | |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 33 | |
| 34 | // Test data objects |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 35 | private static final OnosMetrics.MetricsComponent COMPONENT = |
| 36 | OnosMetrics.registerComponent("MetricsUnitTests"); |
| 37 | private static final OnosMetrics.MetricsFeature FEATURE = |
| 38 | COMPONENT.registerFeature("Filters"); |
| 39 | |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 40 | private static final String TIMER1_NAME = "timer1"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 41 | private static final String TIMER1_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 42 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 43 | "timer1"); |
| 44 | private static final String TIMER2_NAME = "timer2"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 45 | private static final String TIMER2_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 46 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 47 | "timer2"); |
| 48 | private static final String TIMER3_NAME = "timer3"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 49 | private static final String TIMER3_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 50 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 51 | "timer3"); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 52 | |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 53 | private static final String GAUGE1_NAME = "gauge1"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 54 | private static final String GAUGE1_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 55 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 56 | "gauge1"); |
| 57 | private static final String GAUGE2_NAME = "gauge2"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 58 | private static final String GAUGE2_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 59 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 60 | "gauge2"); |
| 61 | private static final String GAUGE3_NAME = "gauge3"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 62 | private static final String GAUGE3_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 63 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 64 | "gauge3"); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 65 | |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 66 | private static final String COUNTER1_NAME = "counter1"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 67 | private static final String COUNTER1_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 68 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 69 | "counter1"); |
| 70 | private static final String COUNTER2_NAME = "counter2"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 71 | private static final String COUNTER2_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 72 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 73 | "counter2"); |
| 74 | private static final String COUNTER3_NAME = "counter3"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 75 | private static final String COUNTER3_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 76 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 77 | "counter3"); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 78 | |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 79 | private static final String METER1_NAME = "meter1"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 80 | private static final String METER1_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 81 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 82 | "meter1"); |
| 83 | private static final String METER2_NAME = "meter2"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 84 | private static final String METER2_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 85 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 86 | "meter2"); |
| 87 | private static final String METER3_NAME = "meter3"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 88 | private static final String METER3_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 89 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 90 | "meter3"); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 91 | |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 92 | private static final String HISTOGRAM1_NAME = "histogram1"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 93 | private static final String HISTOGRAM1_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 94 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 95 | "histogram1"); |
| 96 | private static final String HISTOGRAM2_NAME = "histogram2"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 97 | private static final String HISTOGRAM2_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 98 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 99 | "histogram2"); |
| 100 | private static final String HISTOGRAM3_NAME = "histogram3"; |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 101 | private static final String HISTOGRAM3_FULL_NAME = OnosMetrics.generateName(COMPONENT, |
| 102 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 103 | "histogram3"); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 104 | |
Ray Milkey | 128651a | 2014-07-14 11:24:28 -0700 | [diff] [blame] | 105 | private final Gauge<Integer> testGauge = new Gauge<Integer>() { |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 106 | @Override |
| 107 | public Integer getValue() { |
| 108 | return 1; |
| 109 | } |
| 110 | }; |
| 111 | |
| 112 | /** |
| 113 | * Creates Metrics objects for test. |
| 114 | */ |
| 115 | private void createMetrics() { |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 116 | OnosMetrics.createTimer(COMPONENT, |
| 117 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 118 | TIMER1_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 119 | OnosMetrics.createTimer(COMPONENT, |
| 120 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 121 | TIMER2_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 122 | OnosMetrics.createTimer(COMPONENT, |
| 123 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 124 | TIMER3_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 125 | |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 126 | OnosMetrics.createCounter(COMPONENT, |
| 127 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 128 | COUNTER1_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 129 | OnosMetrics.createCounter(COMPONENT, |
| 130 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 131 | COUNTER2_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 132 | OnosMetrics.createCounter(COMPONENT, |
| 133 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 134 | COUNTER3_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 135 | |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 136 | OnosMetrics.createMeter(COMPONENT, |
| 137 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 138 | METER1_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 139 | OnosMetrics.createMeter(COMPONENT, |
| 140 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 141 | METER2_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 142 | OnosMetrics.createMeter(COMPONENT, |
| 143 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 144 | METER3_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 145 | |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 146 | OnosMetrics.createHistogram(COMPONENT, |
| 147 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 148 | HISTOGRAM1_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 149 | OnosMetrics.createHistogram(COMPONENT, |
| 150 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 151 | HISTOGRAM2_NAME); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 152 | OnosMetrics.createHistogram(COMPONENT, |
| 153 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 154 | HISTOGRAM3_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 155 | |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 156 | OnosMetrics.registerMetric(COMPONENT, |
| 157 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 158 | GAUGE1_NAME, |
| 159 | testGauge); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 160 | OnosMetrics.registerMetric(COMPONENT, |
| 161 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 162 | GAUGE2_NAME, |
| 163 | testGauge); |
Ray Milkey | 71cd2c8 | 2014-07-16 15:02:33 -0700 | [diff] [blame] | 164 | OnosMetrics.registerMetric(COMPONENT, |
| 165 | FEATURE, |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 166 | GAUGE3_NAME, |
| 167 | testGauge); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | /** |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 171 | * Tests that query of non existant name returns nothing. |
| 172 | * |
| 173 | * @throws JSONException if any of the JSON processing fails. |
| 174 | */ |
| 175 | @Test |
| 176 | public void testFilterMatchesNothing() throws JSONException { |
| 177 | |
| 178 | // Read the metrics from the REST API for the test data |
| 179 | final ClientResource client = new ClientResource(getBaseRestMetricsUrl()); |
| 180 | client.addQueryParameter("ids", "xyzzy"); |
| 181 | |
| 182 | final JSONObject metrics = getJSONObject(client); |
| 183 | assertThat(metrics.length(), is(equalTo(5))); |
| 184 | |
| 185 | // There should be no timers, histograms, gauges, meters or counters |
| 186 | checkEmptyLists(metrics, "timers", "histograms", "gauges", "meters", "counters"); |
| 187 | |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Tests that query of multiple metrics of a single Metric type |
| 192 | * returns the proper data. |
| 193 | * |
| 194 | * @throws JSONException if any of the JSON processing fails. |
| 195 | */ |
| 196 | @Test |
| 197 | public void testMultipleFilterSingleType() throws JSONException { |
| 198 | |
| 199 | // Read the metrics from the REST API for the test data |
| 200 | final ClientResource client = new ClientResource(getBaseRestMetricsUrl()); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 201 | client.addQueryParameter("ids", TIMER1_FULL_NAME + "," + TIMER2_FULL_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 202 | |
| 203 | final JSONObject metrics = getJSONObject(client); |
| 204 | assertThat(metrics.length(), is(equalTo(5))); |
| 205 | |
| 206 | // There should be 2 timer that match the filter |
| 207 | final JSONArray timers = metrics.getJSONArray("timers"); |
| 208 | assertThat(timers, is(notNullValue())); |
| 209 | assertThat(timers.length(), is(2)); |
| 210 | |
| 211 | final JSONObject jsonTimer1 = timers.getJSONObject(0); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 212 | assertThat(jsonTimer1.getString("name"), is(equalTo(TIMER1_FULL_NAME))); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 213 | |
| 214 | final JSONObject jsonTimer2 = timers.getJSONObject(1); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 215 | assertThat(jsonTimer2.getString("name"), is(equalTo(TIMER2_FULL_NAME))); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 216 | |
| 217 | // There should be no histograms, gauges, meters or counters |
| 218 | checkEmptyLists(metrics, "histograms", "gauges", "meters", "counters"); |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Tests that query of a single metric retunrs just that metric. |
| 223 | * |
| 224 | * @throws JSONException if any of the JSON processing fails. |
| 225 | */ |
| 226 | @Test |
| 227 | public void testSingleFilter() throws JSONException { |
| 228 | |
| 229 | // Read the metrics from the REST API for the test data |
| 230 | final ClientResource client = new ClientResource(getBaseRestMetricsUrl()); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 231 | client.addQueryParameter("ids", TIMER1_FULL_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 232 | |
| 233 | final JSONObject metrics = getJSONObject(client); |
| 234 | assertThat(metrics.length(), is(equalTo(5))); |
| 235 | |
| 236 | // There should be 1 timer that matches the filter |
| 237 | final JSONArray timers = metrics.getJSONArray("timers"); |
| 238 | assertThat(timers, is(notNullValue())); |
| 239 | assertThat(timers.length(), is(1)); |
| 240 | |
| 241 | final JSONObject jsonTimer1 = timers.getJSONObject(0); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 242 | assertThat(jsonTimer1.getString("name"), is(equalTo(TIMER1_FULL_NAME))); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 243 | |
| 244 | |
| 245 | // There should be no histograms, gauges, meters or counters |
| 246 | checkEmptyLists(metrics, "histograms", "gauges", "meters", "counters"); |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Tests that query of multiple metrics of multiple metric types returns |
| 251 | * the proper data. |
| 252 | * |
| 253 | * @throws JSONException if any of the JSON processing fails. |
| 254 | */ |
| 255 | @Test |
| 256 | public void testMultipleFiltersMultipleTypes() throws JSONException { |
| 257 | |
| 258 | // Read the metrics from the REST API for the test data |
| 259 | final ClientResource client = new ClientResource(getBaseRestMetricsUrl()); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 260 | client.addQueryParameter("ids", |
| 261 | TIMER1_FULL_NAME + "," + |
| 262 | GAUGE2_FULL_NAME + "," + |
| 263 | HISTOGRAM3_FULL_NAME); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 264 | |
| 265 | final JSONObject metrics = getJSONObject(client); |
| 266 | assertThat(metrics.length(), is(equalTo(5))); |
| 267 | |
| 268 | // There should be 1 timer that matches the filter |
| 269 | final JSONArray timers = metrics.getJSONArray("timers"); |
| 270 | assertThat(timers, is(notNullValue())); |
| 271 | assertThat(timers.length(), is(1)); |
| 272 | |
| 273 | final JSONObject jsonTimer1 = timers.getJSONObject(0); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 274 | assertThat(jsonTimer1.getString("name"), is(equalTo(TIMER1_FULL_NAME))); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 275 | |
| 276 | // There should be 1 gauge that matches the filter |
| 277 | final JSONArray gauges = metrics.getJSONArray("gauges"); |
| 278 | assertThat(gauges, is(notNullValue())); |
| 279 | assertThat(gauges.length(), is(1)); |
| 280 | |
| 281 | final JSONObject jsonGauge1 = gauges.getJSONObject(0); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 282 | assertThat(jsonGauge1.getString("name"), is(equalTo(GAUGE2_FULL_NAME))); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 283 | |
| 284 | // There should be 1 histogram that matches the filter |
| 285 | final JSONArray histograms = metrics.getJSONArray("histograms"); |
| 286 | assertThat(histograms, is(notNullValue())); |
| 287 | assertThat(histograms.length(), is(1)); |
| 288 | |
| 289 | final JSONObject jsonHistogram1 = histograms.getJSONObject(0); |
Ray Milkey | 49d67be | 2014-07-10 13:47:01 -0700 | [diff] [blame] | 290 | assertThat(jsonHistogram1.getString("name"), is(equalTo(HISTOGRAM3_FULL_NAME))); |
Ray Milkey | 14c4651 | 2014-07-08 18:30:31 -0700 | [diff] [blame] | 291 | |
| 292 | // There should be no meters or counters |
| 293 | checkEmptyLists(metrics, "meters", "counters"); |
| 294 | } |
| 295 | |
| 296 | |
| 297 | } |