dlmarion commented on code in PR #5478:
URL: https://github.com/apache/accumulo/pull/5478#discussion_r2046869841


##########
core/src/test/java/org/apache/accumulo/core/file/FilePrefixTest.java:
##########
@@ -18,22 +18,79 @@
  */
 package org.apache.accumulo.core.file;
 
+import static org.apache.accumulo.core.file.FilePrefix.ALL;
+import static org.apache.accumulo.core.file.FilePrefix.BULK_IMPORT;
+import static org.apache.accumulo.core.file.FilePrefix.MAJOR_COMPACTION;
+import static 
org.apache.accumulo.core.file.FilePrefix.MAJOR_COMPACTION_ALL_FILES;
+import static 
org.apache.accumulo.core.file.FilePrefix.MERGING_MINOR_COMPACTION;
+import static org.apache.accumulo.core.file.FilePrefix.MINOR_COMPACTION;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
+import java.util.EnumSet;
+
 import org.junit.jupiter.api.Test;
 
 public class FilePrefixTest {
 
   @Test
-  public void testPrefixes() {
-    assertEquals(FilePrefix.BULK_IMPORT, FilePrefix.fromPrefix("I"));
-    assertEquals(FilePrefix.MINOR_COMPACTION, FilePrefix.fromPrefix("F"));
-    assertEquals(FilePrefix.MAJOR_COMPACTION, FilePrefix.fromPrefix("C"));
-    assertEquals(FilePrefix.MAJOR_COMPACTION_ALL_FILES, 
FilePrefix.fromPrefix("A"));
+  public void testFromPrefix() {
+    assertThrows(NullPointerException.class, () -> 
FilePrefix.fromPrefix(null));
+    assertThrows(IllegalArgumentException.class, () -> 
FilePrefix.fromPrefix(""));
+    assertThrows(IllegalArgumentException.class, () -> 
FilePrefix.fromPrefix("AB"));
+    assertEquals(MAJOR_COMPACTION, FilePrefix.fromPrefix("c"));
+    assertEquals(MAJOR_COMPACTION, FilePrefix.fromPrefix("C"));

Review Comment:
   I can't implement this now that case sensitivity has been restored.



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

Reply via email to