Skip to content

chore: Testing java21 aspectj pre-release #1519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
e2e tests with java 21
  • Loading branch information
jeromevdl committed Nov 20, 2023
commit c46ba2d2eb105e832276ada0cdbb8a07fa3aa72a
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public class Infrastructure {
private final String queue;
private final String kinesisStream;
private final String largeMessagesBucket;
private final JavaRuntime lambdaRuntimeVersion;
private String ddbStreamsTableName;
private String functionName;
private Object cfnTemplate;
Expand All @@ -125,7 +124,6 @@ private Infrastructure(Builder builder) {
this.tracing = builder.tracing;
this.envVar = builder.environmentVariables;
this.runtime = builder.runtime;
this.lambdaRuntimeVersion = builder.lambdaRuntimeVersion;
this.timeout = builder.timeoutInSeconds;
this.pathToFunction = builder.pathToFunction;
this.idempotencyTable = builder.idemPotencyTable;
Expand Down Expand Up @@ -206,7 +204,6 @@ public void destroy() {
private Stack createStackWithLambda() {
boolean createTableForAsyncTests = false;
Stack stack = new Stack(app, stackName);

List<String> packagingInstruction = Arrays.asList(
"/bin/sh",
"-c",
Expand Down Expand Up @@ -250,7 +247,7 @@ private Stack createStackWithLambda() {
.handler("software.amazon.lambda.powertools.e2e.Function::handleRequest")
.memorySize(1024)
.timeout(Duration.seconds(timeout))
.runtime(lambdaRuntimeVersion.getCdkRuntime())
.runtime(runtime.getCdkRuntime())
.environment(envVar)
.tracing(tracing ? Tracing.ACTIVE : Tracing.DISABLED)
.build();
Expand Down Expand Up @@ -507,11 +504,9 @@ public static class Builder {
private String queue;
private String kinesisStream;
private String ddbStreamsTableName;
private JavaRuntime lambdaRuntimeVersion;

private Builder() {
runtime = mapRuntimeVersion("JAVA_VERSION");
lambdaRuntimeVersion = mapRuntimeVersion("JAVA_LAMBDA_RUNTIME_VERSION");
}


Expand All @@ -520,7 +515,7 @@ private JavaRuntime mapRuntimeVersion(String environmentVariableName) {
String javaVersion = System.getenv(environmentVariableName); // must be set in GitHub actions
JavaRuntime ret = null;
if (javaVersion == null) {
throw new IllegalArgumentException("JAVA_LAMBDA_RUNTIME_VERSION is not set");
throw new IllegalArgumentException("JAVA_VERSION is not set");
}
if (javaVersion.startsWith("8")) {
ret = JavaRuntime.JAVA8AL2;
Expand Down