From 65a9a65d8d02bfede52ae4848e66d4843f1bdede Mon Sep 17 00:00:00 2001 From: Hector Ventura Date: Thu, 10 Sep 2026 00:27:41 -0500 Subject: [PATCH] test(stepfunctions): pass the SNS handler when constructing AslExecutor in tests (#3345) main does not compile. AslExecutorFailStateErrorCauseTest builds an AslExecutor directly and was missing the SnsJsonHandler argument, so Build and Test fails at the Compile step before a single test runs. A merge-order race put it there, and neither PR was wrong on its own. #3302 added this test class, which constructs AslExecutor by hand. #3316 then added an SnsJsonHandler parameter to that constructor and updated the 26 test classes that constructed it, but that set was taken from a base predating #3302, so this one was never in it. Git merged both cleanly because neither touched the other's lines, and nothing surfaced until test-compile ran on main. One argument, in the position the constructor declares it and the position its sibling AslExecutorCatchTest already uses. Fully qualified to match this file, which spells out eight of its other mocks the same way. No other class needs it. Three further AslExecutor tests carry no SnsJsonHandler either, but they pass their arguments as positional nulls, so the added parameter was absorbed and they compile unchanged. Verified at 483dfb4: ./mvnw test-compile is clean, which is the step currently red on main, and AslExecutorFailStateErrorCauseTest with StepFunctionsFailErrorPathValidationIntegrationTest run 14 green. --- .../stepfunctions/AslExecutorFailStateErrorCauseTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutorFailStateErrorCauseTest.java b/src/test/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutorFailStateErrorCauseTest.java index cc31af3efc..00743015ee 100644 --- a/src/test/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutorFailStateErrorCauseTest.java +++ b/src/test/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutorFailStateErrorCauseTest.java @@ -52,6 +52,7 @@ class AslExecutorFailStateErrorCauseTest { mock(DynamoDbService.class), mock(DynamoDbJsonHandler.class), mock(SqsJsonHandler.class), + mock(io.github.hectorvent.floci.services.sns.SnsJsonHandler.class), mock(io.github.hectorvent.floci.services.cloudformation.CloudFormationQueryHandler.class), mock(io.github.hectorvent.floci.services.ec2.Ec2Service.class), mock(S3Service.class),