elastic / apm-agent-java

https://www.elastic.co/guide/en/apm/agent/java/current/index.html
Apache License 2.0
567 stars 320 forks source link

Extracts ApmServerRule for use in Servlet integration tests #3689

Closed codefromthecrypt closed 3 months ago

codefromthecrypt commented 3 months ago

What does this PR do?

Before we migrate to jupiter (e.g. via openrewrite), we should have code organized as typical JUnit 4 as possible. This extracts out static initialization in servlet ITs as a class rule while keeping all other logic the same.

Next steps will attempt to make TestApp more normalized, possibly via rules or nested or something similar, I'm not quite sure yet, but the goal is to be able to have tests be normal junit tests. Currently, they are loops which have complicated state because they need to peek back and clear apm logs between themselves.

Checklist

Left alone as this is test infra only

codefromthecrypt commented 3 months ago

trying to figure out if this is a flake or not. locally so far so good

codefromthecrypt commented 3 months ago

abandoning this as there's some weird issue in jboss related to (no idea how) on this cd893419137fd80981505c754ecea5cce6fb0bbd