You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/04/03 21:17:35 UTC

[GitHub] [druid] suneet-s opened a new pull request #9614: Add tests for valid and invalid datasource names

suneet-s opened a new pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on a change in pull request #9614: Add tests for valid and invalid datasource names

Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614#discussion_r404231442
 
 

 ##########
 File path: server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
 ##########
 @@ -54,10 +56,20 @@
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
 public class DataSchemaTest
 {
+
+  private static final String VALID_DATASOURCE_CHARS_NAME = "alpha123..*~!@#&%^&*()-+ Россия\\ 한국 中国!";
+  private static final String VALID_DATASOURCE_CHARS_FOR_SERIALIZER = "alpha123..*~!@#&%^&*()-+ Россия\\\\ 한국 中国!";
+
+  static {
+    // testTransformSpec needs NullHandling initialized.
+    NullHandling.initializeForTests();
+  }
 
 Review comment:
   Done

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] ccaominh commented on a change in pull request #9614: Add tests for valid and invalid datasource names

Posted by GitBox <gi...@apache.org>.
ccaominh commented on a change in pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614#discussion_r403344786
 
 

 ##########
 File path: server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
 ##########
 @@ -54,10 +56,20 @@
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
 public class DataSchemaTest
 {
+
+  private static final String VALID_DATASOURCE_CHARS_NAME = "alpha123..*~!@#&%^&*()-+ Россия\\ 한국 中国!";
+  private static final String VALID_DATASOURCE_CHARS_FOR_SERIALIZER = "alpha123..*~!@#&%^&*()-+ Россия\\\\ 한국 中国!";
 
 Review comment:
   Suggest adding a helper method that escapes `VALID_DATASOURCE_CHARS_NAME`. The helper method can be used here as well as in `testSerializeWithInvalidDataSourceName()`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] clintropolis merged pull request #9614: Add tests for valid and invalid datasource names

Posted by GitBox <gi...@apache.org>.
clintropolis merged pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] ccaominh commented on a change in pull request #9614: Add tests for valid and invalid datasource names

Posted by GitBox <gi...@apache.org>.
ccaominh commented on a change in pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614#discussion_r403344175
 
 

 ##########
 File path: server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
 ##########
 @@ -54,10 +56,20 @@
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
 public class DataSchemaTest
 {
+
+  private static final String VALID_DATASOURCE_CHARS_NAME = "alpha123..*~!@#&%^&*()-+ Россия\\ 한국 中国!";
+  private static final String VALID_DATASOURCE_CHARS_FOR_SERIALIZER = "alpha123..*~!@#&%^&*()-+ Россия\\\\ 한국 中国!";
+
+  static {
+    // testTransformSpec needs NullHandling initialized.
+    NullHandling.initializeForTests();
+  }
 
 Review comment:
   The test class can extend `NullHandlingTest` instead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] clintropolis commented on a change in pull request #9614: Add tests for valid and invalid datasource names

Posted by GitBox <gi...@apache.org>.
clintropolis commented on a change in pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614#discussion_r404438984
 
 

 ##########
 File path: server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
 ##########
 @@ -54,10 +57,14 @@
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
-public class DataSchemaTest
+public class DataSchemaTest extends NullHandlingTest
 
 Review comment:
   nit: it's actually `InitializedNullHandlingTest` that you want, but the one you've extended also initializes null handling

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on a change in pull request #9614: Add tests for valid and invalid datasource names

Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #9614: Add tests for valid and invalid datasource names
URL: https://github.com/apache/druid/pull/9614#discussion_r404231580
 
 

 ##########
 File path: server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
 ##########
 @@ -54,10 +56,20 @@
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
 public class DataSchemaTest
 {
+
+  private static final String VALID_DATASOURCE_CHARS_NAME = "alpha123..*~!@#&%^&*()-+ Россия\\ 한국 中国!";
+  private static final String VALID_DATASOURCE_CHARS_FOR_SERIALIZER = "alpha123..*~!@#&%^&*()-+ Россия\\\\ 한국 中国!";
 
 Review comment:
   👍 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org