adoroszlai commented on code in PR #8227:
URL: https://github.com/apache/ozone/pull/8227#discussion_r2028602610
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java:
##########
@@ -85,13 +85,15 @@ void shutdown() {
}
@ParameterizedTest
- @ValueSource(booleans = {true, false})
- public void testChunkInfoCmdBeforeAfterCloseContainer(boolean isEcKey)
throws Exception {
+ @CsvSource(value = {"true,FILE_SYSTEM_OPTIMIZED",
"false,FILE_SYSTEM_OPTIMIZED",
+ "true,LEGACY", "false,LEGACY",
+ "true,OBJECT_STORE", "false,OBJECT_STORE"})
+ public void testChunkInfoCmdBeforeAfterCloseContainer(boolean isEcKey,
BucketLayout layout) throws Exception {
Review Comment:
I guess we can keep this parameterized only by `boolean`.
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java:
##########
@@ -102,18 +104,20 @@ public void
testChunkInfoCmdBeforeAfterCloseContainer(boolean isEcKey) throws Ex
assertEquals(0, exitCode);
}
- @Test
- public void testChunkInfoVerifyPathsAreDifferent() throws Exception {
+ @ParameterizedTest
+ @ValueSource(strings = {"FILE_SYSTEM_OPTIMIZED", "LEGACY", "OBJECT_STORE"})
Review Comment:
```suggestion
@EnumSource
```
(needs import)
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java:
##########
@@ -102,18 +104,20 @@ public void
testChunkInfoCmdBeforeAfterCloseContainer(boolean isEcKey) throws Ex
assertEquals(0, exitCode);
}
- @Test
- public void testChunkInfoVerifyPathsAreDifferent() throws Exception {
+ @ParameterizedTest
+ @ValueSource(strings = {"FILE_SYSTEM_OPTIMIZED", "LEGACY", "OBJECT_STORE"})
+ public void testChunkInfoVerifyPathsAreDifferent(BucketLayout layout) throws
Exception {
final String volumeName = UUID.randomUUID().toString();
final String bucketName = UUID.randomUUID().toString();
final String keyName = UUID.randomUUID().toString();
- writeKey(volumeName, bucketName, keyName, false);
+ writeKey(volumeName, bucketName, keyName, false, layout);
int exitCode = runChunkInfoAndVerifyPaths(volumeName, bucketName, keyName);
assertEquals(0, exitCode);
}
- @Test
- public void testLdbCliForOzoneSnapshot() throws Exception {
+ @ParameterizedTest
+ @CsvSource(value = {"FILE_SYSTEM_OPTIMIZED,fileTable", "LEGACY,keyTable",
"OBJECT_STORE,keyTable"})
Review Comment:
Please use `@EnumSource`, and call
`OMMetadataManager.getKeyTable(layout).getName()` to get the table name.
https://github.com/apache/ozone/blob/abc1e028345161444809f0b8815de55399d0c157/hadoop-ozone/interface-storage/src/main/java/org/apache/hadoop/ozone/om/OMMetadataManager.java#L386
https://github.com/apache/ozone/blob/abc1e028345161444809f0b8815de55399d0c157/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/Table.java#L176-L181
--
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]