paul-rogers commented on a change in pull request #1114: Drill-6104: Added 
Logfile Reader
URL: https://github.com/apache/drill/pull/1114#discussion_r200861956
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/dfs/TestFormatPluginOptionExtractor.java
 ##########
 @@ -72,9 +72,15 @@ public void test() {
               "(type: String, fileSystemMetadata: boolean, descriptive: 
boolean, timeZone: String)", d.presentParams()
           );
           break;
+        case "logRegex":
+          assertEquals(LogFormatConfig.class, d.pluginConfigClass);
+          assertEquals(
+              "(type: String, regex: String, extension: String, maxErrors: 
int, schema: List)", d.presentParams()
 
 Review comment:
   This test is now tightly coupled to the `toString()` implementation, which 
is awkward since, in general, folks might change that at any time to make 
debugging easier.
   
   Better:
   ```
   assertEquals("logRegex", d.type);
   assertNull(d.extension);
   ...
   assertEquals(0, d.maxErrors);
   ```
   
   Which raises an interesting question: what are good default values?
   
   Similar test is needed for fields. Here, what are good defaults? What should 
be done if certain values are bogus or missing?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to