ArafatKhan2198 commented on code in PR #12119:
URL: https://github.com/apache/ozone/pull/12119#discussion_r4681239705


##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -114,32 +124,33 @@ File Can Be Listed
     END
 
 Key List
+    ${result} =    Execute Later ozone sh    key list /vol1/bucket1
+
     IF    '${CLIENT_VERSION}' >= '${EC_VERSION}'
-        ${result} =     Execute    ozone sh key list /vol1/bucket1
-                        Should Contain    ${result}    key-${DATA_VERSION}
+        Assert Later    File ${result} Should    Contain    key-${DATA_VERSION}
     ELSE IF    '${DATA_VERSION}' < '${EC_VERSION}' # New client creates 
RATIS/ONE key by default: BUG?
-        ${result} =     Key List With Replication    /vol1/bucket1
-                        Should contain    ${result}    key-${DATA_VERSION} 
RATIS 3
+        Assert Later    File ${result} Filtered By ${KEY_REPLICATION_FILTER} 
Should    Contain    key-${DATA_VERSION} RATIS 3
     END
 
 Key List In Bucket With Replication
     Pass Execution If    '${CLUSTER_VERSION}' < '${EC_VERSION}'   Cluster does 
not support EC
 
-    IF    '${CLIENT_VERSION}' < '${EC_VERSION}'
-        ${result} =     Key List With Replication    
/vol1/ratis-${CLUSTER_VERSION}/
-                        Should contain  ${result}   key-${DATA_VERSION} RATIS 3
+    ${ratis_result} =     Execute Later ozone sh    key list 
/vol1/ratis-${CLUSTER_VERSION}
+    ${ec_result} =     Execute Later ozone sh    key list 
/vol1/ecbucket-${CLUSTER_VERSION}
 
-        Assert Unsupported    ozone sh key list 
/vol1/ecbucket-${CLUSTER_VERSION}/
+    IF    '${CLIENT_VERSION}' < '${EC_VERSION}'
+        Assert Later    File ${ratis_result} Filtered By 
${KEY_REPLICATION_FILTER} Should    Contain    key-${DATA_VERSION} RATIS 3
+        Assert Later    File ${ec_result} Should    Contain    
NOT_SUPPORTED_OPERATION

Review Comment:
   If an old client prints `NOT_SUPPORTED_OPERATION` but returns 1 instead of 
255, would this test still pass? Is that change intentional?”



##########
hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot:
##########
@@ -40,31 +44,74 @@ Expected Snapshot Diff Output
     END
 
 
-
 *** Test Cases ***
 Create Bucket With Replication Type
     Pass Execution If    '${CLIENT_VERSION}' < '${EC_VERSION}'    Client does 
not support EC
     Pass Execution If    '${CLUSTER_VERSION}' < '${EC_VERSION}'   Cluster does 
not support EC
-    Execute             ozone sh bucket create --replication 3 --type RATIS 
/vol1/ratis-${CLIENT_VERSION}
-    Execute             ozone sh bucket create --replication rs-3-2-1024k 
--type EC /vol1/ecbucket-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    bucket create 
--replication 3 --type RATIS /vol1/ratis-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    bucket create 
--replication rs-3-2-1024k --type EC /vol1/ecbucket-${CLIENT_VERSION}
 
 Create Encrypted Bucket
-    Execute    ozone sh bucket create -k ${ENCRYPTION_KEY} 
/vol1/encrypted-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    bucket create -k 
${ENCRYPTION_KEY} /vol1/encrypted-${CLIENT_VERSION}
 
 Create Key in Encrypted Bucket
-    Execute    ozone sh key put /vol1/encrypted-${CLIENT_VERSION}/key 
${TESTFILE}
+    Execute Later and Expect No Output For ozone sh    key put 
/vol1/encrypted-${CLIENT_VERSION}/key ${TESTFILE}
 
 Key Can Be Written
-    Create Key    /vol1/bucket1/key-${CLIENT_VERSION}    ${TESTFILE}
+    Execute Later and Expect No Output For ozone sh    key put 
/vol1/bucket1/key-${CLIENT_VERSION} ${TESTFILE}
 
 Key Can Be Written To Bucket With Replication Type
     Pass Execution If    '${CLUSTER_VERSION}' < '${EC_VERSION}'   Cluster does 
not support EC
-    Execute         ozone sh key put 
/vol1/ratis-${CLUSTER_VERSION}/key-${CLIENT_VERSION} ${TESTFILE}
-    Execute         ozone sh key put 
/vol1/ecbucket-${CLUSTER_VERSION}/key-${CLIENT_VERSION} ${TESTFILE}
+    Execute Later and Expect No Output For ozone sh    key put 
/vol1/ratis-${CLUSTER_VERSION}/key-${CLIENT_VERSION} ${TESTFILE}
+    Execute Later and Expect No Output For ozone sh    key put 
/vol1/ecbucket-${CLUSTER_VERSION}/key-${CLIENT_VERSION} ${TESTFILE}
 
 Key Can Be Deleted
-    Create Key    /vol1/bucket1/to-be-deleted-${CLIENT_VERSION}    ${TESTFILE}
-    Execute       ozone sh key delete 
/vol1/bucket1/to-be-deleted-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    key put 
/vol1/bucket1/to-be-deleted-${CLIENT_VERSION} ${TESTFILE}
+    Execute Later and Expect No Output For ozone sh    key delete 
/vol1/bucket1/to-be-deleted-${CLIENT_VERSION}
+
+FSO Bucket Can Be Created
+    Pass Execution If    '${CLIENT_VERSION}' < '${FSO_VERSION}'    Client does 
not support FSO
+    Pass Execution If    '${CLUSTER_VERSION}' < '${FSO_VERSION}'   Cluster 
does not support FSO
+    Execute Later and Expect No Output For ozone sh    bucket create --layout 
FILE_SYSTEM_OPTIMIZED ${FSO_BUCKET}
+
+Snapshot Can Be Created
+    Pass Execution If    '${CLIENT_VERSION}' < '${SNAPSHOT_VERSION}'    Client 
does not support snapshots
+    Pass Execution If    '${CLUSTER_VERSION}' < '${SNAPSHOT_VERSION}'   
Cluster does not support snapshots
+
+    Execute Later ozone sh    snapshot create ${FSO_BUCKET} ${SNAPSHOT1}
+    Execute Later and Expect No Output For ozone sh    key put 
${FSO_BUCKET}/${SNAPSHOT_KEY1} ${TESTFILE}
+    Execute Later ozone sh    snapshot create ${FSO_BUCKET} ${SNAPSHOT2}
+    Execute Later and Expect No Output For ozone sh    key put 
${FSO_BUCKET}/${SNAPSHOT_KEY2} ${TESTFILE}
+    Execute Later ozone sh    snapshot create ${FSO_BUCKET} ${SNAPSHOT3}

Review Comment:
   Could we check that each snapshot create succeeds? For data written by a 
1.4.1 client, the later tests only compare snapshots 1 and 2. If snapshot 3 
fails to create, we could miss it.



##########
hadoop-ozone/dist/src/main/smoketest/ozone-lib/batch.robot:
##########
@@ -31,8 +36,11 @@ Setup Batch
 
 
 Teardown Batch
-    Execute Batch
-    Remove Directory    ${BATCH_OUTPUT_DIR}    recursive=True
+    TRY
+        Execute Batch

Review Comment:
   The suite has already run the batch by the time cleanup gets here. Could 
Execute Batch skip starting another ozone sh when there are no commands left?



##########
hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot:
##########
@@ -40,31 +44,74 @@ Expected Snapshot Diff Output
     END
 
 
-
 *** Test Cases ***
 Create Bucket With Replication Type
     Pass Execution If    '${CLIENT_VERSION}' < '${EC_VERSION}'    Client does 
not support EC
     Pass Execution If    '${CLUSTER_VERSION}' < '${EC_VERSION}'   Cluster does 
not support EC
-    Execute             ozone sh bucket create --replication 3 --type RATIS 
/vol1/ratis-${CLIENT_VERSION}
-    Execute             ozone sh bucket create --replication rs-3-2-1024k 
--type EC /vol1/ecbucket-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    bucket create 
--replication 3 --type RATIS /vol1/ratis-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    bucket create 
--replication rs-3-2-1024k --type EC /vol1/ecbucket-${CLIENT_VERSION}
 
 Create Encrypted Bucket
-    Execute    ozone sh bucket create -k ${ENCRYPTION_KEY} 
/vol1/encrypted-${CLIENT_VERSION}
+    Execute Later and Expect No Output For ozone sh    bucket create -k 
${ENCRYPTION_KEY} /vol1/encrypted-${CLIENT_VERSION}

Review Comment:
   We create an EC bucket just above, then create this encrypted bucket without 
replication flags. Could we check that this bucket has no replicationConfig? 
That would catch the exact bug described in the PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to