1010import java .time .Duration ;
1111import java .util .List ;
1212import org .junit .jupiter .api .Test ;
13+ import org .slf4j .Logger ;
14+ import org .slf4j .LoggerFactory ;
1315import software .amazon .awssdk .services .lambda .model .*;
1416
1517class DurableContextTest {
18+ private static final Logger logger = LoggerFactory .getLogger (DurableContextTest .class );
1619
1720 private DurableContext createTestContext () {
1821 var executionOp = Operation .builder ()
@@ -39,6 +42,7 @@ private DurableContext createTestContext(List<Operation> initialOperations) {
3942
4043 @ Test
4144 void testContextCreation () {
45+ logger .info ("testContextCreation" );
4246 var context = createTestContext ();
4347
4448 assertNotNull (context );
@@ -47,6 +51,7 @@ void testContextCreation() {
4751
4852 @ Test
4953 void testGetExecutionContext () {
54+ logger .info ("testGetExecutionContext" );
5055 var context = createTestContext ();
5156
5257 var executionContext = context .getExecutionContext ();
@@ -61,6 +66,7 @@ void testGetExecutionContext() {
6166
6267 @ Test
6368 void testStepExecution () {
69+ logger .info ("testStepExecution" );
6470 var context = createTestContext ();
6571
6672 var result = context .step ("test" , String .class , () -> "Hello World" );
@@ -70,6 +76,7 @@ void testStepExecution() {
7076
7177 @ Test
7278 void testStepReplay () {
79+ logger .info ("testStepReplay" );
7380 // Create context with existing operation
7481 var existingOp = Operation .builder ()
7582 .id ("1" )
@@ -86,6 +93,7 @@ void testStepReplay() {
8693
8794 @ Test
8895 void testStepAsync () throws Exception {
96+ logger .info ("testStepAsync" );
8997 var context = createTestContext ();
9098
9199 var future = context .stepAsync ("async-test" , String .class , () -> "Async Result" );
@@ -96,6 +104,7 @@ void testStepAsync() throws Exception {
96104
97105 @ Test
98106 void testStepAsyncReplay () throws Exception {
107+ logger .info ("testStepAsyncReplay" );
99108 // Create context with existing operation
100109 var existingOp = Operation .builder ()
101110 .id ("1" )
@@ -112,6 +121,7 @@ void testStepAsyncReplay() throws Exception {
112121
113122 @ Test
114123 void testWait () {
124+ logger .info ("testWait" );
115125 var context = createTestContext ();
116126
117127 // Wait should throw SuspendExecutionException
@@ -122,6 +132,7 @@ void testWait() {
122132
123133 @ Test
124134 void testWaitReplay () {
135+ logger .info ("testWaitReplay" );
125136 // Create context with completed wait operation
126137 var existingOp =
127138 Operation .builder ().id ("1" ).status (OperationStatus .SUCCEEDED ).build ();
@@ -135,24 +146,29 @@ void testWaitReplay() {
135146
136147 @ Test
137148 void testCombinedSyncAsyncWait () throws Exception {
149+ logger .info ("testCombinedSyncAsyncWait" );
138150 var context = createTestContext ();
139151
140152 // Execute sync step
141153 var syncResult = context .step ("sync-step" , String .class , () -> "Sync Done" );
142154 assertEquals ("Sync Done" , syncResult );
155+ logger .info ("testCombinedSyncAsyncWait - Sync Done" );
143156
144157 // Execute async step
145158 var asyncFuture = context .stepAsync ("async-step" , Integer .class , () -> 42 );
146159 assertEquals (42 , asyncFuture .get ());
160+ logger .info ("testCombinedSyncAsyncWait - Async Done" );
147161
148162 // Wait should suspend (throw exception)
149163 assertThrows (SuspendExecutionException .class , () -> {
150164 context .wait (Duration .ofSeconds (30 ));
165+ logger .info ("testCombinedSyncAsyncWait - Wait Done" );
151166 });
152167 }
153168
154169 @ Test
155170 void testCombinedReplay () throws Exception {
171+ logger .info ("testCombinedReplay" );
156172 // Create context with all operations completed
157173 var syncOp = Operation .builder ()
158174 .id ("1" )
@@ -183,6 +199,7 @@ void testCombinedReplay() throws Exception {
183199
184200 @ Test
185201 void testNamedWait () {
202+ logger .info ("testNamedWait" );
186203 var ctx = createTestContext ();
187204
188205 // Named wait should throw SuspendExecutionException
@@ -203,6 +220,7 @@ void testNamedWait() {
203220
204221 @ Test
205222 void testStepWithTypeToken () {
223+ logger .info ("testStepWithTypeToken" );
206224 var context = createTestContext ();
207225
208226 List <String > result = context .step ("test-list" , new TypeToken <List <String >>() {}, () -> List .of ("a" , "b" , "c" ));
@@ -214,6 +232,7 @@ void testStepWithTypeToken() {
214232
215233 @ Test
216234 void testStepWithTypeTokenReplay () {
235+ logger .info ("testStepWithTypeTokenReplay" );
217236 // Create context with existing operation
218237 var existingOp = Operation .builder ()
219238 .id ("1" )
@@ -235,6 +254,7 @@ void testStepWithTypeTokenReplay() {
235254
236255 @ Test
237256 void testStepWithTypeTokenAndConfig () {
257+ logger .info ("testStepWithTypeTokenAndConfig" );
238258 var context = createTestContext ();
239259
240260 List <Integer > result = context .step (
@@ -252,6 +272,7 @@ void testStepWithTypeTokenAndConfig() {
252272
253273 @ Test
254274 void testStepAsyncWithTypeToken () throws Exception {
275+ logger .info ("testStepAsyncWithTypeToken" );
255276 var context = createTestContext ();
256277
257278 DurableFuture <List <String >> future =
@@ -265,6 +286,7 @@ void testStepAsyncWithTypeToken() throws Exception {
265286
266287 @ Test
267288 void testStepAsyncWithTypeTokenReplay () throws Exception {
289+ logger .info ("testStepAsyncWithTypeTokenReplay" );
268290 // Create context with existing operation
269291 var existingOp = Operation .builder ()
270292 .id ("1" )
@@ -287,6 +309,7 @@ void testStepAsyncWithTypeTokenReplay() throws Exception {
287309
288310 @ Test
289311 void testStepAsyncWithTypeTokenAndConfig () throws Exception {
312+ logger .info ("testStepAsyncWithTypeTokenAndConfig" );
290313 var context = createTestContext ();
291314
292315 DurableFuture <List <Integer >> future = context .stepAsync (
0 commit comments