Galsza commented on code in PR #8173:
URL: https://github.com/apache/ozone/pull/8173#discussion_r2027512890


##########
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/utils/db/TestDBConfigFromFile.java:
##########
@@ -90,23 +70,21 @@ public void readFromFile() throws IOException {
 
   @Test
   public void readFromFileInvalidConfig() throws IOException {
-    final List<String> families =
-        Arrays.asList(StringUtils.bytes2String(RocksDB.DEFAULT_COLUMN_FAMILY),
-            "First", "Second", "Third",
-            "Fourth", "Fifth",
-            "Sixth");
-    final List<ColumnFamilyDescriptor> columnFamilyDescriptors =
-        new ArrayList<>();
-    for (String family : families) {
-      columnFamilyDescriptors.add(
-          new ColumnFamilyDescriptor(family.getBytes(StandardCharsets.UTF_8),
-              new ColumnFamilyOptions()));
-    }
-
-    final DBOptions options = DBConfigFromFile.readFromFile("badfile.db.ini",
-        columnFamilyDescriptors);
-
+    final DBOptions options = 
DBConfigFromFile.readDBOptionsFromFile(Paths.get("badfile.db.ini"));
     // This has to return a Null, since we have config defined for badfile.db
     assertNull(options);
   }
+
+  @Test

Review Comment:
   Added the empty file check, for a misconfigured file we get a native error 
"libc++abi: terminating with uncaught exception of type std::invalid_argument: 
stoull: no conversion" and it terminates the test process. I'm not sure how to 
handle or test that if needed.



-- 
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