ChinmaySKulkarni commented on a change in pull request #696: PHOENIX-5607 
Client-server backward compatibility tests
URL: https://github.com/apache/phoenix/pull/696#discussion_r383564072
 
 

 ##########
 File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityIT.java
 ##########
 @@ -0,0 +1,353 @@
+/*
+ * 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.end2end;
+
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeFalse;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.InputStreamReader;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.curator.shaded.com.google.common.collect.Lists;
+import org.apache.phoenix.coprocessor.MetaDataProtocol;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * This class is meant for testing all compatible client versions 
+ * against the current server version. It runs SQL queries with given 
+ * client versions and compares the output against gold files
+ */
+
+@RunWith(Parameterized.class)
+public class BackwardCompatibilityIT extends BaseOwnClusterIT {
 
 Review comment:
   There is a comment in `BaseOwnClusterIT` saying "Any new integration tests 
that need their own mini cluster should be extending {link 
BaseUniqueNamesOwnClusterIT} class directly."
   
   Also, there is a TODO in `BaseUniqueNamesOwnClusterIT` 
[here](https://github.com/apache/phoenix/blob/dd31f74b68c4ad984dd30bc77cc335be0ad9056f/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseUniqueNamesOwnClusterIT.java#L27-L29)
 saying to convert all tests extending `BaseOwnClusterIT` to use 
`BaseUniqueNamesOwnClusterIT` instead.
   
   So, we should probably extend that class. This will require you to use 
`BaseTest#generateUniqueName()` instead of using pre-defined names and might 
complicate the gold file stuff. Can you change your gold file comparison logic 
to pass in table/index/view names as parameters?

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


With regards,
Apache Git Services

Reply via email to