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

Konstantin Shvachko commented on HDFS-13778:
--------------------------------------------

Was looking at this test. Here is the summary of changes:
# Removed federated miniDFSCluster setup. Currently the test defines two 
nameservices: one explicitly named "nameservice", and the other named 
"minidfs-ns" by calling {{MiniDFSNNTopology.simpleHATopology()}}. So in the end 
it creates two volumes, which are not needed in the case.
# Renamed {{AlignmentContextProxyProvider}} to {{ORPPwithAlignmentContexts}} 
and derived the latter from {{ObserverReadProxyProvider}}. So now all tests run 
with the real ORPP. {{ORPPwithAlignmentContexts}} only collects 
AlignmentContexts from underlying multiple clients in to {{AC_LIST}}.
# Removed {{SpyConfiguredContextProxyProvider}} along with the only test 
{{testNoStateOnConfiguredProxyProvider()}} that used it. I don't see the test 
useful anymore since it emulates a negative condition, that if you use a wrong 
ProxyProvider, then it will not update {{lastSeenStateId}}.
# Spent most of the time fixing {{testMultiClientStatesWithRandomFailovers()}}. 
It is the longest running test case here. Since now ORPP really performs 
failover when SBN and Active NN switch, the wait time between failovers should 
be increased. Otherwise failover logic will be chasing constantly changing ANN.
#* This is BTW the reason that the running time for the test case varies a lot. 
Something to keep an eye on, if it becomes flaky.
# Had to remove test case {{testClientSendsState()}}, which verifies the RPC 
headers received from the server, and is based on mocking the AlignmentContext. 
I don't see much value of doing it on such a low level. We have other tests 
verifying that {{lastSeenStateId}} is changing after write operations, which is 
the real goal as opposed to testing the implementation details.
But I would not object if [~zero45] wants to resurrect this test case by 
mocking something else.
# Minor things, like replacing {{System.out.println}} and adding more logging.

> In TestStateAlignmentContextWithHA replace artificial 
> AlignmentContextProxyProvider with real ObserverReadProxyProvider.
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-13778
>                 URL: https://issues.apache.org/jira/browse/HDFS-13778
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: test
>            Reporter: Konstantin Shvachko
>            Assignee: Sherwood Zheng
>            Priority: Major
>
> TestStateAlignmentContextWithHA uses an artificial 
> AlignmentContextProxyProvider, which was temporary needed for testing. Now 
> that we have real ObserverReadProxyProvider it can take over ACPP. This is 
> also useful for testing the ORPP.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to