Skip to content

Commit 1e3e7eb

Browse files
committed
pr review
1 parent c6a0174 commit 1e3e7eb

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

buildscripts/codenarc.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ ruleset {
275275
JUnitUnnecessarySetUp
276276
JUnitUnnecessaryTearDown
277277
JUnitUnnecessaryThrowsException
278+
SpockIgnoreRestUsed
278279
UnnecessaryFail
279280
UseAssertEqualsInsteadOfAssertTrue
280281
UseAssertFalseInsteadOfNegation

docs/contributing/writing-instrumentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ a `testImplementation` dependency on the `testing` submodule. Then, create a tes
226226
the abstract test class from `testing`. You should implement the abstract `configure()` method to
227227
initialize the library using the exposed mechanism to register interceptors/listeners, perhaps a
228228
method like `registerInterceptor`. You can also wrap the object with the instrumentation decorator.
229-
Make sure that the test class is marked as a library instrumentation test. Both JUnit test
229+
Make sure that the test class is marked as a library instrumentation test. JUnit test
230230
utilities expose a way to specify whether you're running a library or javaagent test. If the tests
231231
pass, the library instrumentation is working.
232232

muzzle/src/test/java/io/opentelemetry/javaagent/tooling/muzzle/MuzzleWeakReferenceTestUtil.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
public class MuzzleWeakReferenceTestUtil {
1818

19-
// Spock holds strong references to all local variables. For weak reference testing we must create
20-
// our strong references away from Spock in this java class.
21-
// Even returning a WeakReference<ClassLoader> is enough for spock to create a strong ref.
2219
public static boolean classLoaderRefIsGarbageCollected()
2320
throws InterruptedException, TimeoutException {
2421
ClassLoader loader = new URLClassLoader(new URL[0], null);

testing-common/src/main/java/io/opentelemetry/instrumentation/test/utils/ClasspathUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ private static void addToJar(String resourceName, byte[] bytes, JarOutputStream
9393
jarOutputStream.closeEntry();
9494
}
9595

96-
// Moved this to a java class because groovy was adding a hard ref to classLoader
9796
public static boolean isClassLoaded(String className, ClassLoader classLoader) {
9897
try {
9998
Method findLoadedClassMethod =

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/GlobalTraceUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import io.opentelemetry.instrumentation.testing.util.ThrowingSupplier;
1111

1212
/**
13-
* Can be useful when you need to start a span {@link
13+
* Can be useful when you need to start a span and {@link
1414
* io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension} is not available.
1515
*/
1616
public final class GlobalTraceUtil {

0 commit comments

Comments
 (0)