Skip to content

Commit 56f1aa9

Browse files
committed
update proxy factory test
1 parent 20a95bc commit 56f1aa9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

javaagent-tooling/src/test/java/io/opentelemetry/javaagent/tooling/instrumentation/indy/IndyProxyFactoryTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,16 +310,20 @@ private static void privateStaticMethod() {}
310310
}
311311

312312
@Test
313-
void verifyNonPublicMembersIgnored() throws Exception {
313+
void verifyNonPublicMembersIgnored() {
314314
Class<?> proxy = generateProxy(IgnoreNonPublicMethods.class);
315315

316316
assertThat(proxy.getConstructors()).hasSize(1);
317317
assertThat(proxy.getDeclaredMethods())
318318
.hasSize(3)
319319
.anySatisfy(method -> assertThat(method.getName()).isEqualTo("publicMethod"))
320320
.anySatisfy(method -> assertThat(method.getName()).isEqualTo("publicStaticMethod"))
321-
.anySatisfy(method -> assertThat(method.getName()).isEqualTo(
322-
IndyProxyFactory.PROXY_DELEGATE_NAME));
321+
// IndyProxy implementation visible but later hidden by reflection instrumentation
322+
.anySatisfy(
323+
method -> {
324+
assertThat(method.getName()).isEqualTo(IndyProxyFactory.PROXY_DELEGATE_NAME);
325+
assertThat(method.isSynthetic()).isTrue();
326+
});
323327
}
324328

325329
@Test

0 commit comments

Comments
 (0)