Skip to content

Commit

Permalink
cleanup the rushed #3436 PR (#3437)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackshirazi authored Nov 23, 2023
1 parent 97569b0 commit 9422833
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.commons.pool2.impl.CallStackUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
Expand Down Expand Up @@ -421,8 +422,8 @@ void testPluginClassLoaderGCdAfterUndoingInstrumentation() {
await().untilAsserted(() -> assertThat(pluginClassLoader.get()).isNull());
}

//this is failing from unspecified - likely metaspace specific GC not happening - in CI
// @Test
@Disabled("this is failing from unspecified - likely metaspace specific GC not happening - in CI")
@Test
void testNoClassLoaderLeakWhenInstrumentedApplicationIsUndeployed() throws Exception {
ElasticApmAgent.initInstrumentation(tracer,
ByteBuddyAgent.install(),
Expand All @@ -442,10 +443,7 @@ void testNoClassLoaderLeakWhenInstrumentedApplicationIsUndeployed() throws Excep
applicationCL = null;
instrumentedClass = null;

long start = System.currentTimeMillis();
while(System.currentTimeMillis()-start < 10_000) {

}
System.gc();
System.gc();
await().untilAsserted(() -> assertThat(applicationCLRef.get()).isNull());
}
Expand Down

0 comments on commit 9422833

Please sign in to comment.