/** * Checks that the wasb_web_responses counter is at the given value. * @param base The base value (before the operation of interest). * @param expected The expected value for the operation of interest. * @return The new base value now. */ private long assertWebResponsesEquals(long base, long expected) { assertCounter(WASB_WEB_RESPONSES, base + expected, getMyMetrics()); return base + expected; }
@Test public void testMetricTags() throws Exception { String accountName = getTestAccount().getRealAccount().getBlobEndpoint() .getAuthority(); String containerName = getTestAccount().getRealContainer().getName(); MetricsRecordBuilder myMetrics = getMyMetrics(); verify(myMetrics).add(argThat( new TagMatcher("accountName", accountName) )); verify(myMetrics).add(argThat( new TagMatcher("containerName", containerName) )); verify(myMetrics).add(argThat( new TagMatcher("Context", "azureFileSystem") )); verify(myMetrics).add(argThat( new TagExistsMatcher("wasbFileSystemId") )); }