GeorgeJahad commented on a change in pull request #2961:
URL: https://github.com/apache/ozone/pull/2961#discussion_r778439903
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestKeyManagerImpl.java
##########
@@ -338,32 +365,24 @@ public void testCreateDirectory() throws IOException {
keyArgs = createBuilder()
.setKeyName(keyName)
.build();
- OpenKeySession keySession = keyManager.openKey(keyArgs);
+ OpenKeySession keySession = writeClient.openKey(keyArgs);
keyArgs.setLocationInfoList(
keySession.getKeyInfo().getLatestVersionLocations().getLocationList());
- keyManager.commitKey(keyArgs, keySession.getId());
+ writeClient.commitKey(keyArgs, keySession.getId());
try {
- keyManager.createDirectory(keyArgs);
+ writeClient.createDirectory(keyArgs);
Assert.fail("Creation should fail for directory.");
} catch (OMException e) {
Assert.assertEquals(e.getResult(),
OMException.ResultCodes.FILE_ALREADY_EXISTS);
}
- // create directory for root directory
- keyName = "";
- keyArgs = createBuilder()
- .setKeyName(keyName)
- .build();
- keyManager.createDirectory(keyArgs);
- Assert.assertTrue(keyManager.getFileStatus(keyArgs).isDirectory());
-
Review comment:
I removed this test because I think it is invalid. See
[OMDirectoryCreateRequest](https://github.com/apache/ozone/blob/c4579ec5427758f6fa53b555b8de05a9d3f4d222/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMDirectoryCreateRequest.java#L175)
(And it fails now that I'm invoking createDirectory through the write-path.)
--
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]