Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot authored and bulldozer-bot[bot] committed Oct 2, 2019
1 parent 4d8f26e commit 5bdf771
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
com.google.common.base.Preconditions.*,
com.palantir.logsafe.Preconditions.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
com.palantir.logsafe.Preconditions.*,
com.google.common.base.Preconditions.*,
org.apache.commons.lang3.Validate.*"/>
org.apache.commons.lang3.Validate.*,
org.assertj.core.api.Assertions.*,
org.mockito.Mockito.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:gradle-info-plugin:5.1.0'
classpath 'com.netflix.nebula:nebula-publishing-plugin:13.6.1'
classpath 'com.palantir.baseline:gradle-baseline-java:2.15.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.16.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void after() {
@Test
void defaultMetrics() {
metrics = MetricRegistries.createWithHdrHistogramReservoirs();
assertThat(metrics.getGauges().size()).isEqualTo(3);
assertThat(metrics.getGauges()).hasSize(3);
assertThat(metrics.getGauges()).containsKey(MetricRegistries.RESERVOIR_TYPE_METRIC_NAME);
assertThat(metrics.getGauges().get(MetricRegistries.RESERVOIR_TYPE_METRIC_NAME).getValue())
.isEqualTo(HdrHistogramReservoir.class.getName());
Expand Down Expand Up @@ -406,7 +406,7 @@ void testMetricsMatching() {
metrics.counter("non.matching");

SortedMap<String, Metric> metricsMatching = MetricRegistries.metricsMatching(metrics, palantirFilter);
assertThat(metricsMatching.size()).isEqualTo(2);
assertThat(metricsMatching).hasSize(2);
assertThat(metricsMatching.keySet())
.containsExactly("test.a", "test.b");
assertThat(metricsMatching.values())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void testRemoveMetric(TaggedMetricRegistry registry) {

Optional<Metric> removedGauge = registry.remove(METRIC_1);
assertThat(removedGauge).isPresent().get().isSameAs(gauge);
assertThat(registry.remove(METRIC_1).isPresent()).isFalse();
assertThat(registry.remove(METRIC_1)).isNotPresent();
}

@ParameterizedTest
Expand Down

0 comments on commit 5bdf771

Please sign in to comment.