Skip to content

Commit 5d9cd64

Browse files
committed
minor code improvements
1 parent 75916c5 commit 5d9cd64

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

examples/src/test/java/software/amazon/lambda/durable/examples/CloudBasedIntegrationTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ void testManyAsyncStepsExample() {
389389
assertEquals(ExecutionStatus.SUCCEEDED, result.getStatus());
390390

391391
var finalResult = result.getResult(String.class);
392+
System.out.println("ManyAsyncStepsExample result: " + finalResult);
392393
assertNotNull(finalResult);
393394
assertTrue(finalResult.contains("500 async steps"));
394395
assertTrue(finalResult.contains("249500")); // Sum of 0..499 * 2

sdk/src/main/java/software/amazon/lambda/durable/DurableContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ public DurableLogger getLogger() {
319319
* Clears the logger's thread properties. Called during context destruction to prevent memory leaks and ensure clean
320320
* state for subsequent executions.
321321
*/
322+
@Override
322323
public void close() {
323324
if (logger != null) {
324325
logger.close();

sdk/src/test/java/software/amazon/lambda/durable/operation/WaitOperationTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ void setUp() {
3636

3737
@Test
3838
void constructor_withNullDuration_shouldThrow() {
39-
var executionManager = mock(ExecutionManager.class);
40-
4139
var exception = assertThrows(
4240
IllegalArgumentException.class,
4341
() -> new WaitOperation(OPERATION_ID, OPERATION_NAME, null, durableContext));
@@ -47,8 +45,6 @@ void constructor_withNullDuration_shouldThrow() {
4745

4846
@Test
4947
void constructor_withZeroDuration_shouldThrow() {
50-
var executionManager = mock(ExecutionManager.class);
51-
5248
var exception = assertThrows(
5349
IllegalArgumentException.class,
5450
() -> new WaitOperation(OPERATION_ID, OPERATION_NAME, Duration.ofSeconds(0), durableContext));
@@ -59,8 +55,6 @@ void constructor_withZeroDuration_shouldThrow() {
5955

6056
@Test
6157
void constructor_withSubSecondDuration_shouldThrow() {
62-
var executionManager = mock(ExecutionManager.class);
63-
6458
var exception = assertThrows(
6559
IllegalArgumentException.class,
6660
() -> new WaitOperation(OPERATION_ID, OPERATION_NAME, Duration.ofMillis(500), durableContext));
@@ -71,8 +65,6 @@ void constructor_withSubSecondDuration_shouldThrow() {
7165

7266
@Test
7367
void constructor_withValidDuration_shouldPass() {
74-
var executionManager = mock(ExecutionManager.class);
75-
7668
var operation = new WaitOperation(OPERATION_ID, OPERATION_NAME, Duration.ofSeconds(10), durableContext);
7769

7870
assertEquals(OPERATION_ID, operation.getOperationId());

0 commit comments

Comments
 (0)