Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Oct 7, 2019
1 parent 5938b05 commit 49df0aa
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 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 @@ -27,7 +27,7 @@ buildscript {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.0.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.10.1'
classpath 'com.palantir.baseline:gradle-baseline-java:2.18.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void handles_async_spans() throws Exception {
Tracer.clearCurrentTrace(); // just pretending all these tasks are on a fresh request

DetachedSpan crossThread = DetachedSpan.start("task-queue-time" + i);
executorService.submit(() -> {
executorService.execute(() -> {
try (CloseableSpan t = crossThread.completeAndStartChild("task" + i)) {
emit_nested_spans();
countDownLatch.countDown();
Expand Down Expand Up @@ -97,7 +97,7 @@ public void onFailure(Throwable _throwable) {
});

try (CloseableTracer root = CloseableTracer.startSpan("bbb")) {
executorService.submit(() -> {
executorService.execute(() -> {
future.set(null);
});
}
Expand All @@ -124,7 +124,7 @@ void multi_producer_single_consumer() throws InterruptedException {
Tracer.clearCurrentTrace(); // just pretending all these tasks are on a fresh request

DetachedSpan span = DetachedSpan.start("callback-pending" + i + " (cross thread span)");
producerExecutorService.submit(() -> {
producerExecutorService.execute(() -> {
work.add(new QueuedWork() {
@Override
public String name() {
Expand Down Expand Up @@ -219,7 +219,7 @@ public void onFailure(Throwable _throwable) {
}
}, executor);

executor.submit(() -> {
executor.execute(() -> {
future.set(null);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void handles_async_spans() throws Exception {
IntStream.range(0, numTasks).forEach(i -> {
DetachedSpan detachedSpan = DetachedSpan.start("task-queue-time" + i);

executorService.submit(() -> {
executorService.execute(() -> {
try (CloseableSpan closeableSpan = detachedSpan.completeAndStartChild("do-work-" + i)) {
prod_code();
countDownLatch.countDown();
Expand Down
4 changes: 2 additions & 2 deletions tracing/src/test/java/com/palantir/tracing/TracerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void testTraceCopyIsIndependent() throws Exception {
} finally {
Tracer.fastCompleteSpan();
}
assertThat(Tracer.completeSpan().isPresent()).isFalse();
assertThat(Tracer.completeSpan()).isNotPresent();
}

@Test
Expand Down Expand Up @@ -340,7 +340,7 @@ public void testCompleteRootSpanCompletesTrace() {
} finally {
Tracer.unsubscribe("traceIds");
}
assertThat(traceIds.size()).isEqualTo(2);
assertThat(traceIds).hasSize(2);
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions tracing/src/test/java/com/palantir/tracing/TracersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ private static Callable<Void> traceExpectingCallableWithSingleSpan(String operat
String traceId = Tracer.getTraceId();
List<OpenSpan> trace = getCurrentTrace();
OpenSpan span = trace.remove(trace.size() - 1);
assertThat(trace.size()).isEqualTo(0);
assertThat(trace).hasSize(0);

assertThat(traceId).isEqualTo(outsideTraceId);
assertThat(span.getOperation()).isEqualTo(operation);
Expand All @@ -619,7 +619,7 @@ private static Runnable traceExpectingRunnableWithSingleSpan(String operation) {
String traceId = Tracer.getTraceId();
List<OpenSpan> trace = getCurrentTrace();
OpenSpan span = trace.remove(trace.size() - 1);
assertThat(trace.size()).isEqualTo(0);
assertThat(trace).hasSize(0);

assertThat(traceId).isEqualTo(outsideTraceId);
assertThat(span.getOperation()).isEqualTo(operation);
Expand Down

0 comments on commit 49df0aa

Please sign in to comment.