[ 
https://issues.apache.org/jira/browse/HIVE-14536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15449885#comment-15449885
 ] 

Peter Vary commented on HIVE-14536:
-----------------------------------

Hi [~sseth],

I am sure you understand that I would feel much better, if [~kgyrtkirk] or you 
would voiced your timing concerns before I started working on the patch, 
specially since I have tried to communicate my intentions in our pervious 
conversations where I stated I would like to refactor the code [~kgyrtkirk] 
refactored.

Forget the past, let's see what we could do:
As I have checked the current changes in HIVE-14443, I see multiple ones which 
are not related to the IDE support, but more related to have a clean testing 
infrastructure, for which the test class cleanup is a good fit - I might be 
mistaken here, correct me if I am wrong.

As for the concrete points you mentioned above:
- Since there is a CodeBeeLineDriver (commented out class), which is removed by 
the refactor, I think I should create a commented out TestBeeLineDriver to keep 
the important code/knowledge to use it later
- Hadoop version - I have only moved [~kgyrtkirk] code to the util class. I 
would like to see his opinion on this change. Or alterantively we could leave 
it as it is, and file another jira, if we think it has to be changed later.
- As for moving the run methods (runTest, runVersionedTest, etc) to a separate 
class - I will do it
- CliConfig - I was undecided on this issue myself, but if you both think, that 
a builder class worth it, then I will do it

QTestUtil:
Currently the QTestUtil has more responsibilities which should be separated 
(and the sensitive local variables, you already mentioned in the RB):
- Setting up, tearing down the cluster
- Parsing the qfiles (skip, sort, hash etc)
- Running the commands
- Comparing results
I have yet to formulate the best solution for here, but first step might be 
removing the qfile parsing, skiping/sorting/hashing etc - because it is easy to 
review this, and removes a big chunk of code from the class - helping the 
further cleanup. (You see, I am learning here - small incremental changes if 
possible :) ). After that I might create a TestCluster object with the required 
methods, so the actual implementation could be encapsulated in it - not 
absolutely conformable with this solution, so I will investigate further when 
the time arrives. We should find the best timing for this, and until then I 
could work on other jiras.

Thanks,
Peter


> Unit test code cleanup
> ----------------------
>
>                 Key: HIVE-14536
>                 URL: https://issues.apache.org/jira/browse/HIVE-14536
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Testing Infrastructure
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>         Attachments: HIVE-14536.5.patch, HIVE-14536.6.patch, 
> HIVE-14536.7.patch, HIVE-14536.patch
>
>
> Clean up the itest infrastructure, to create a readable, easy to understand 
> code



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to