hypertrace/javaagent

Smoke tests are failing due to missing otlp attribute

Closed this issue · 0 comments

The smoke tests are failing since otel.library.version attribute does not match the agent version. Also I debugged a bit and this attribute is not even set.

eg. SpringBootDisabledBodyCaptureSmokeTest line 83

Assertions.assertTrue(
        getSpanStream(traces)
                .flatMap(span -> span.getAttributesList().stream())
                .filter(attribute -> attribute.getKey().equals(OTEL_LIBRARY_VERSION_ATTRIBUTE))
                .map(attribute -> attribute.getValue().getStringValue())
                .filter(value -> value.equals(currentAgentVersion))
                .count()
            > 0)

More logs:

javaagent % make smoke-test                          
./gradlew :smoke-tests:test --stacktrace

> Task :smoke-tests:test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:<homedir>.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.5.11/4d8f25c5da08af46fb204fd493ec894699a3f4e8/groovy-2.5.11.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

SpringBootDisabledBodyCaptureSmokeTest > get() FAILED
    org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
        at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
        at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)
        at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:162)
        at org.hypertrace.agent.smoketest.SpringBootDisabledBodyCaptureSmokeTest.get(SpringBootDisabledBodyCaptureSmokeTest.java:83)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/<homedir>.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.5.11/4d8f25c5da08af46fb204fd493ec894699a3f4e8/groovy-2.5.11.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

SpringBootSmokeTest > get() FAILED
    org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
        at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
        at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)
        at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:162)
        at org.hypertrace.agent.smoketest.SpringBootSmokeTest.get(SpringBootSmokeTest.java:102)
<============-> 99% EXECUTING [15m 8s]
> :smoke-tests:test > 172 tests completed, 2 failed
> IDLE
> :smoke-tests:test > Executing test org.hypertrace.agent.smoketest.GrpcSmokeTest
^Cmake: *** [smoke-test] Error 130