kadirozde commented on a change in pull request #779:
URL: https://github.com/apache/phoenix/pull/779#discussion_r425579243



##########
File path: 
phoenix-core/src/test/java/org/apache/phoenix/index/ShouldVerifyTest.java
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.index;
+
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.coprocessor.IndexRebuildRegionScanner;
+import org.apache.phoenix.mapreduce.index.IndexTool;
+import org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.io.IOException;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
+
+public class ShouldVerifyTest {

Review comment:
       This test class is written to test a tiny method which does a simple 
check. Given how this test class is constructed, I do not see any value of 
these tests and the entire class. I am not sure if you notice that these tests 
verifies that the following block of code is correct
   if(a != null || b == IndexTool.IndexVerifyType.ONLY) {
               return true;
           }
           return !c;
   where a, b and c are supplied by the tests. 
   
   I suggest adding a test to an existing integration test to test this 
incremental verification feature end to end. The jira does not explain how this 
feature is activated. It seems one needs to provide the end time parameter. If 
so, the same end time parameter needs to be used for the base run and the 
incremental runs.  How do we differentiate the result table entries of one run 
from those for another run when these runs use the same end time? Do we need to 
differentiate it? How about the start time? What happens if the end times are 
the same but the start times are different for these runs. All these questions 
would have been considered if an integration test were written. Have you 
considered them?




----------------------------------------------------------------
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:
[email protected]


Reply via email to