File tree Expand file tree Collapse file tree 6 files changed +5
-30
lines changed
jboss-logmanager/jboss-logmanager-appender-1.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jbosslogmanager/appender/v1_1
log4j-appender-1.2/javaagent/src/test/java/io/opentelemetry/instrumentation/log4j/appender/v1_2
log4j-appender-2.17/testing/src/main/java/io/opentelemetry/instrumentation/log4j/appender/v2_17
spring/spring-batch-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/batch/v3_0/item
testing-common/src/main/java
io/opentelemetry/instrumentation/testing/junit/http Expand file tree Collapse file tree 6 files changed +5
-30
lines changed Original file line number Diff line number Diff line change 1919import io .opentelemetry .instrumentation .testing .junit .AgentInstrumentationExtension ;
2020import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
2121import io .opentelemetry .sdk .common .InstrumentationScopeInfo ;
22- import io .opentelemetry .sdk .logs .data .LogRecordData ;
2322import io .opentelemetry .sdk .testing .assertj .AttributeAssertion ;
2423import io .opentelemetry .semconv .incubating .ThreadIncubatingAttributes ;
2524import java .time .Instant ;
2625import java .util .ArrayList ;
2726import java .util .Arrays ;
2827import java .util .List ;
2928import java .util .stream .Stream ;
30- import org .assertj .core .api .AssertAccess ;
3129import org .jboss .logmanager .Level ;
3230import org .jboss .logmanager .LogContext ;
3331import org .jboss .logmanager .Logger ;
@@ -166,8 +164,7 @@ private static void test(
166164 }
167165 logRecord .hasAttributesSatisfyingExactly (attributeAsserts );
168166
169- LogRecordData logRecordData = AssertAccess .getActual (logRecord );
170- assertThat (logRecordData .getTimestampEpochNanos ())
167+ assertThat (logRecord .actual ().getTimestampEpochNanos ())
171168 .isGreaterThanOrEqualTo (MILLISECONDS .toNanos (start .toEpochMilli ()))
172169 .isLessThanOrEqualTo (MILLISECONDS .toNanos (Instant .now ().toEpochMilli ()));
173170 });
Original file line number Diff line number Diff line change 2222import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
2323import io .opentelemetry .instrumentation .testing .junit .code .SemconvCodeStabilityUtil ;
2424import io .opentelemetry .sdk .common .InstrumentationScopeInfo ;
25- import io .opentelemetry .sdk .logs .data .LogRecordData ;
2625import io .opentelemetry .sdk .testing .assertj .AttributeAssertion ;
2726import java .lang .reflect .Field ;
2827import java .time .Instant ;
3332import org .apache .log4j .Logger ;
3433import org .apache .log4j .MDC ;
3534import org .apache .log4j .helpers .Loader ;
36- import org .assertj .core .api .AssertAccess ;
3735import org .junit .jupiter .api .Test ;
3836import org .junit .jupiter .api .extension .RegisterExtension ;
3937import org .junit .jupiter .params .ParameterizedTest ;
@@ -161,8 +159,7 @@ private static void test(
161159 SemconvCodeStabilityUtil .codeFileAndLineAssertions ("Log4j1Test.java" ));
162160 logRecord .hasAttributesSatisfyingExactly (attributeAsserts );
163161
164- LogRecordData logRecordData = AssertAccess .getActual (logRecord );
165- assertThat (logRecordData .getTimestampEpochNanos ())
162+ assertThat (logRecord .actual ().getTimestampEpochNanos ())
166163 .isGreaterThanOrEqualTo (MILLISECONDS .toNanos (start .toEpochMilli ()))
167164 .isLessThanOrEqualTo (MILLISECONDS .toNanos (Instant .now ().toEpochMilli ()));
168165 });
Original file line number Diff line number Diff line change 2424import io .opentelemetry .api .trace .SpanContext ;
2525import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
2626import io .opentelemetry .sdk .common .InstrumentationScopeInfo ;
27- import io .opentelemetry .sdk .logs .data .LogRecordData ;
2827import io .opentelemetry .sdk .testing .assertj .AttributeAssertion ;
2928import java .time .Instant ;
3029import java .util .ArrayList ;
3736import org .apache .logging .log4j .ThreadContext ;
3837import org .apache .logging .log4j .message .StringMapMessage ;
3938import org .apache .logging .log4j .message .StructuredDataMessage ;
40- import org .assertj .core .api .AssertAccess ;
4139import org .junit .jupiter .api .Test ;
4240import org .junit .jupiter .params .ParameterizedTest ;
4341import org .junit .jupiter .params .provider .Arguments ;
@@ -132,8 +130,7 @@ private void test(
132130 }
133131 logRecord .hasAttributesSatisfyingExactly (attributeAsserts );
134132
135- LogRecordData logRecordData = AssertAccess .getActual (logRecord );
136- assertThat (logRecordData .getTimestampEpochNanos ())
133+ assertThat (logRecord .actual ().getTimestampEpochNanos ())
137134 .isGreaterThanOrEqualTo (MILLISECONDS .toNanos (start .toEpochMilli ()))
138135 .isLessThanOrEqualTo (MILLISECONDS .toNanos (Instant .now ().toEpochMilli ()));
139136 });
Original file line number Diff line number Diff line change 1818import java .util .List ;
1919import java .util .Map ;
2020import java .util .function .Consumer ;
21- import org .assertj .core .api .AssertAccess ;
2221import org .junit .jupiter .api .Test ;
2322import org .junit .jupiter .api .extension .RegisterExtension ;
2423import org .springframework .batch .core .Job ;
@@ -161,7 +160,7 @@ void shouldTraceAllItemOperationsOnAparallelItemsJob() {
161160 // firstly compute child span count for each chunk, we'll sort chunks from larger to
162161 // smaller based on child count
163162
164- List <SpanData > spans = AssertAccess . getActual ( trace );
163+ List <SpanData > spans = trace . actual ( );
165164 Map <SpanData , Long > childCount = new HashMap <>();
166165
167166 for (SpanData span : spans ) {
Original file line number Diff line number Diff line change 8282import java .util .function .Consumer ;
8383import java .util .stream .Stream ;
8484import javax .annotation .Nullable ;
85- import org .assertj .core .api .AssertAccess ;
8685import org .awaitility .Awaitility ;
8786import org .junit .jupiter .api .AfterAll ;
8887import org .junit .jupiter .api .BeforeAll ;
@@ -754,7 +753,7 @@ protected void assertTheTraces(
754753 trace .hasSpansSatisfyingExactly (spanAssertions );
755754
756755 if (options .verifyServerSpanEndTime ) {
757- List <SpanData > spanData = AssertAccess . getActual ( trace );
756+ List <SpanData > spanData = trace . actual ( );
758757 if (spanData .size () > 1 ) {
759758 SpanData rootSpan = spanData .get (0 );
760759 for (int j = 1 ; j < spanData .size (); j ++) {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments