Scénario de test & Cas d'usage
No data preparation is needed for this scenario, as it focuses on session metadata and error handling.
| 1 | /* No data setup is required for this action. */ |
| 1 | PROC CAS; |
| 2 | string invalid_uuid = 'a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890'; |
| 3 | PRINT 'Attempting to check status for a non-existent UUID: ' || invalid_uuid; |
| 4 | ACTION SESSION.actionstatus / uuid=invalid_uuid; |
| 5 | RUN; |
| 1 | PROC CAS; |
| 2 | SESSION casauto name='TempSessionForTermination'; |
| 3 | ACTION SESSION.listSessions RESULT=r; |
| 4 | string terminated_uuid; |
| 5 | DO row over r.SESSION; |
| 6 | IF row['Session Name'] == 'TempSessionForTermination' THEN |
| 7 | terminated_uuid = row['Session UUID']; |
| 8 | END; |
| 9 | PRINT 'Captured UUID for session to be terminated: ' || terminated_uuid; |
| 10 | SESSION TempSessionForTermination terminate; |
| 11 | PRINT 'Session terminated.'; |
| 12 | RUN; |
| 1 | PROC CAS; |
| 2 | /* Assumes terminated_uuid is populated from the previous step */ |
| 3 | PRINT 'Attempting to check status for the terminated UUID: ' || terminated_uuid; |
| 4 | ACTION SESSION.actionstatus / uuid=terminated_uuid; |
| 5 | RUN; |
Both step 1 and step 3 are expected to fail gracefully. The CAS log should show an error message indicating that the session specified by the UUID could not be found. The key result is that the PROC CAS step does not abort and the client session remains active, demonstrating the action's robustness against invalid input.