DaveTeng0 commented on code in PR #4708:
URL: https://github.com/apache/ozone/pull/4708#discussion_r1200839878
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyCreateRequest.java:
##########
@@ -138,81 +140,94 @@ public void preExecuteRejectsInvalidReplication() {
public void testValidateAndUpdateCache() throws Exception {
when(ozoneManager.getOzoneLockProvider()).thenReturn(
new OzoneLockProvider(keyPathLockEnabled, enableFileSystemPaths));
- OMRequest modifiedOmRequest =
- doPreExecute(createKeyRequest(false, 0));
- OMKeyCreateRequest omKeyCreateRequest =
- getOMKeyCreateRequest(modifiedOmRequest);
+ String[] validKeyNames = {
+ keyName,
+ OM_SNAPSHOT_INDICATOR + "abc/" + keyName,
+ "a/" + OM_SNAPSHOT_INDICATOR + "/b/c/" + keyName
+ };
+ for (String validKeyName : validKeyNames) {
Review Comment:
The only changes I added in this tests is just to create a String array of
validKeyNames, then iterate them through as keyName in original test. (also add
indent to original code block due to the new for-loop)
--
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]