dbwong commented on a change in pull request #430: PHOENIX-5091 Add new 
features to UpdateStatisticsTool
URL: https://github.com/apache/phoenix/pull/430#discussion_r251148501
 
 

 ##########
 File path: 
phoenix-core/src/test/java/org/apache/phoenix/schema/stats/UpdateStatisticsToolTest.java
 ##########
 @@ -0,0 +1,68 @@
+package org.apache.phoenix.schema.stats;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+
+import static 
org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY;
+
+public class UpdateStatisticsToolTest {
+
+    @Test (expected = IllegalStateException.class)
+    public void testTableNameIsMandatory() {
+        UpdateStatisticsTool tool = new UpdateStatisticsTool();
+        tool.parseOptions(new String[] {});
+    }
+
+    @Test (expected = IllegalStateException.class)
+    public void testManageSnapshotAndRunFgOption1() {
+        UpdateStatisticsTool tool = new UpdateStatisticsTool();
+        tool.parseOptions(new String[] {"-t", "table1", "-ms"});
+    }
+
+    @Test
+    public void testManageSnapshotAndRunFgOption2() {
+        UpdateStatisticsTool tool = new UpdateStatisticsTool();
+        tool.parseOptions(new String[] {"-t", "table1", "-ms", "-runfg"});
+    }
 
 Review comment:
   Can we add an accessor or something for an assert here?

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