Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot authored Jul 27, 2021
1 parent 4a645df commit bbbca6b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bCharset.defaultCharset\("/>
<property name="message" value="Use explicit charset (e.g. StandardCharsets.UTF-8) instead of default."/>
<property name="message" value="Use explicit charset (e.g. StandardCharsets.UTF_8) instead of default."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bIOUtils\.toString\("/>
Expand Down Expand Up @@ -405,7 +405,7 @@
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
</module>
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
Expand Down
12 changes: 12 additions & 0 deletions .baseline/idea/intellij-java-palantir-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
<package name="" withSubpackages="true" static="false" />
</value>
</option>
<DO_NOT_IMPORT_INNER>
<CLASS name="Builder" />
<CLASS name="Callback" />
<CLASS name="Class" />
<CLASS name="Entry" />
<CLASS name="Enum" />
<CLASS name="Factory" />
<CLASS name="Type" />
<CLASS name="Key" />
<CLASS name="Id" />
<CLASS name="Provider" />
</DO_NOT_IMPORT_INNER>
</GroovyCodeStyleSettings>
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildscript {
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.2.0'
classpath 'com.palantir.gradle.revapi:gradle-revapi:1.5.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
classpath 'com.palantir.baseline:gradle-baseline-java:3.65.0'
classpath 'com.palantir.baseline:gradle-baseline-java:4.9.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.3'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.0.0'
Expand Down
32 changes: 16 additions & 16 deletions tracing/src/test/java/com/palantir/tracing/AsyncTracerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public void doesNotLeakEnqueueSpan() {

deferredTracer.withTrace(() -> {
Trace traceCopy = Tracer.copyTrace().get();
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("async-run"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("async-run"));
return null;
});
}
Expand All @@ -70,23 +70,23 @@ public void preservesState() {

asyncTracer.withTrace(() -> {
Trace traceCopy = Tracer.copyTrace().get();
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("async-run"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("baz"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("bar"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("foo"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("async-run"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("baz"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("bar"));
assertThat(traceCopy.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("foo"));
return null;
});

assertThat(originalTrace.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("baz"));
assertThat(originalTrace.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("bar"));
assertThat(originalTrace.pop()).isPresent().hasValueSatisfying(span -> span.getSpanId()
.equals("foo"));
assertThat(originalTrace.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("baz"));
assertThat(originalTrace.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("bar"));
assertThat(originalTrace.pop()).isPresent().hasValueSatisfying(span -> assertThat(span.getOperation())
.isEqualTo("foo"));
}

/** Get reference to the current trace. */
Expand Down

0 comments on commit bbbca6b

Please sign in to comment.