Scénario de test & Cas d'usage
Ensure the target directory for the caslib does not exist before starting the test to properly simulate the scenario.
| 1 | /* Pre-requisite: The directory '/tmp/cas/user_temp_space' must not exist on the CAS controller's file system. */ |
| 2 | /* rm -rf /tmp/cas/user_temp_space */ |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslib / |
| 3 | name="UserTempSpace" |
| 4 | path="/tmp/cas/user_temp_space" |
| 5 | dataSource={srcType="PATH"} |
| 6 | createDirectory=false |
| 7 | transient=true; |
| 8 | RUN; QUIT; |
| 1 | PROC CAS; |
| 2 | TABLE.caslibInfo / caslib="UserTempSpace"; |
| 3 | TABLE.fileInfo / caslib="UserTempSpace"; /* This step is expected to produce an error in the log */ |
| 4 | RUN; QUIT; |
| 1 | |
| 2 | PROC CAS; |
| 3 | |
| 4 | TABLE.dropCaslib / caslib="UserTempSpace"; |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslib / |
| 3 | name="UserTempSpace" |
| 4 | path="/tmp/cas/user_temp_space" |
| 5 | dataSource={srcType="PATH"} |
| 6 | createDirectory=true |
| 7 | transient=true; |
| 8 | RUN; QUIT; |
| 1 | |
| 2 | PROC CAS; |
| 3 | |
| 4 | TABLE.fileInfo / caslib="UserTempSpace"; |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
In step 1, the 'UserTempSpace' caslib is created successfully, but the log for step 2 shows an error indicating the path does not exist when fileInfo is called, confirming the QA point. After dropping and re-adding the caslib with 'createDirectory=true' in step 4, the fileInfo action in step 5 executes successfully (showing an empty directory), proving the caslib is now functional. The caslib will not persist after the server restarts because it is transient.