-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert internal-lambda test from groovy to java (#9611)
- Loading branch information
Showing
3 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
...ation/internal/internal-lambda/javaagent/src/test/groovy/LambdaInstrumentationTest.groovy
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...io/opentelemetry/javaagent/instrumentation/internal/lambda/LambdaInstrumentationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.internal.lambda; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import io.opentelemetry.javaagent.bootstrap.VirtualFieldInstalledMarker; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class LambdaInstrumentationTest { | ||
|
||
@Test | ||
void testTransformRunnableLambda() { | ||
Runnable runnable = TestLambda.makeRunnable(); | ||
|
||
// RunnableInstrumentation adds a VirtualField to all implementors of Runnable. If lambda class | ||
// is transformed then it must have context store marker interface. | ||
assertThat(runnable).isInstanceOf(VirtualFieldInstalledMarker.class); | ||
assertThat(VirtualFieldInstalledMarker.class.isAssignableFrom(Runnable.class)).isFalse(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters