chore: Testing java21 aspectj pre-release by scottgerring · Pull Request #1519 · aws-powertools/powertools-lambda-java (original) (raw)

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

@@ -213,7 +211,6 @@ private Stack createStackWithLambda() {

"cd " + pathToFunction +

" && timeout -s SIGKILL 5m mvn clean install -ff " +

" -Dmaven.test.skip=true " +

" -Dmaven.resources.skip=true " +

" -Dmaven.compiler.source=" + runtime.getMvnProperty() +

" -Dmaven.compiler.target=" + runtime.getMvnProperty() +

" && cp /asset-input/" + pathToFunction + "/target/function.jar /asset-output/"

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(environmentVariableName + " is not set");

}

if (javaVersion.startsWith("8")) {

ret = JavaRuntime.JAVA8AL2;

Expand Down