TEST: Groom and refactor Helix integration tests
authorHunter Lee <hulee@linkedin.com>
Sat, 4 May 2019 00:52:17 +0000 (17:52 -0700)
committerHunter Lee <hulee@linkedin.com>
Sat, 25 May 2019 01:19:21 +0000 (18:19 -0700)
commit5ce3934c5b4655e90021061720adbb3a42b1bb6b
treefacf4a18de387865da1a38bd96a619ac7e0e4913
parentcd821cd620b6821cbe3d4ccf7072efeb3b924d32
TEST: Groom and refactor Helix integration tests

It was observed that there was a lot of technical debt (improper and buggy cleanup) in Helix's unit and integration tests. There were also mock controller and participant threads that were never shut down properly. This was preventing mvn test suite from completing over a remote machine (TMC), and even on local environments, mvn test was not passing. This diff refactors tests and makes sure that ZK is cleaned up after tests.

Changelist:
1. Inspect and correct mock threads (controller, participant, spectator, etc)
2. Ensure there are no leftover garbage clusters from tests
3. Java 8 syntax
4. Style fixes in old tests using Helix open source style file (helix-style.xml)

RB=1654905
G=helix-reviewers
A=jxue,eblumena

Signed-off-by: Hunter Lee <hulee@linkedin.com>
125 files changed:
helix-core/src/main/java/org/apache/helix/ClusterMessagingService.java
helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
helix-core/src/main/java/org/apache/helix/task/TaskUtil.java
helix-core/src/main/java/org/apache/helix/tools/ClusterStateVerifier.java
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java
helix-core/src/test/conf/testng.xml
helix-core/src/test/java/org/apache/helix/TestHelper.java
helix-core/src/test/java/org/apache/helix/TestHierarchicalDataStore.java
helix-core/src/test/java/org/apache/helix/TestZkBasis.java
helix-core/src/test/java/org/apache/helix/TestZnodeModify.java
helix-core/src/test/java/org/apache/helix/common/ZkTestBase.java
helix-core/src/test/java/org/apache/helix/controller/rebalancer/TestZeroReplicaAvoidance.java
helix-core/src/test/java/org/apache/helix/controller/stages/BaseStageTest.java
helix-core/src/test/java/org/apache/helix/controller/stages/DummyClusterManager.java
helix-core/src/test/java/org/apache/helix/controller/stages/TestExternalViewStage.java
helix-core/src/test/java/org/apache/helix/controller/stages/TestMessageThrottleStage.java
helix-core/src/test/java/org/apache/helix/controller/stages/TestRebalancePipeline.java
helix-core/src/test/java/org/apache/helix/integration/TestAddClusterV2.java
helix-core/src/test/java/org/apache/helix/integration/TestAddNodeAfterControllerStart.java
helix-core/src/test/java/org/apache/helix/integration/TestAlertingRebalancerFailure.java
helix-core/src/test/java/org/apache/helix/integration/TestBatchMessageHandling.java
helix-core/src/test/java/org/apache/helix/integration/TestCMWithFailParticipant.java
helix-core/src/test/java/org/apache/helix/integration/TestCorrectnessOnConnectivityLoss.java
helix-core/src/test/java/org/apache/helix/integration/TestDisable.java
helix-core/src/test/java/org/apache/helix/integration/TestDisableCustomCodeRunner.java
helix-core/src/test/java/org/apache/helix/integration/TestDisableExternalView.java
helix-core/src/test/java/org/apache/helix/integration/TestDisablePartition.java
helix-core/src/test/java/org/apache/helix/integration/TestDisableResource.java
helix-core/src/test/java/org/apache/helix/integration/TestDistributedCMMain.java
helix-core/src/test/java/org/apache/helix/integration/TestDistributedClusterController.java
helix-core/src/test/java/org/apache/helix/integration/TestDrop.java
helix-core/src/test/java/org/apache/helix/integration/TestEnableCompression.java
helix-core/src/test/java/org/apache/helix/integration/TestEnablePartitionDuringDisable.java
helix-core/src/test/java/org/apache/helix/integration/TestErrorPartition.java
helix-core/src/test/java/org/apache/helix/integration/TestExternalViewUpdates.java
helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java
helix-core/src/test/java/org/apache/helix/integration/TestHelixUsingDifferentParams.java
helix-core/src/test/java/org/apache/helix/integration/TestPartitionMovementThrottle.java
helix-core/src/test/java/org/apache/helix/integration/TestPauseSignal.java
helix-core/src/test/java/org/apache/helix/integration/TestPreferenceListAsQueue.java
helix-core/src/test/java/org/apache/helix/integration/TestRebalancerPersistAssignments.java
helix-core/src/test/java/org/apache/helix/integration/TestReelectedPipelineCorrectness.java
helix-core/src/test/java/org/apache/helix/integration/TestRenamePartition.java
helix-core/src/test/java/org/apache/helix/integration/TestResetInstance.java
helix-core/src/test/java/org/apache/helix/integration/TestSchemataSM.java
helix-core/src/test/java/org/apache/helix/integration/TestSessionExpiryInTransition.java
helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMMain.java
helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMSessionExpiry.java
helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionThrottle.java
helix-core/src/test/java/org/apache/helix/integration/TestSyncSessionToController.java
helix-core/src/test/java/org/apache/helix/integration/TestWeightBasedRebalanceUtil.java
helix-core/src/test/java/org/apache/helix/integration/TestZkConnectionLost.java
helix-core/src/test/java/org/apache/helix/integration/TestZkSessionExpiry.java
helix-core/src/test/java/org/apache/helix/integration/common/ZkStandAloneCMTestBase.java
helix-core/src/test/java/org/apache/helix/integration/controller/TestClusterMaintenanceMode.java
helix-core/src/test/java/org/apache/helix/integration/controller/TestControllerLeadershipChange.java
helix-core/src/test/java/org/apache/helix/integration/manager/TestConsecutiveZkSessionExpiry.java
helix-core/src/test/java/org/apache/helix/integration/manager/TestControllerManager.java
helix-core/src/test/java/org/apache/helix/integration/manager/TestDistributedControllerManager.java
helix-core/src/test/java/org/apache/helix/integration/manager/TestHelixDataAccessor.java
helix-core/src/test/java/org/apache/helix/integration/manager/TestParticipantManager.java
helix-core/src/test/java/org/apache/helix/integration/manager/TestZkHelixAdmin.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestCrossClusterMessagingService.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestGroupCommitAddBackData.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestMessageThrottle2.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestP2PMessageSemiAuto.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestP2PNoDuplicatedMessage.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestP2PSingleTopState.java
helix-core/src/test/java/org/apache/helix/integration/messaging/TestSchedulerMessage.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/CrushRebalancers/TestCrushAutoRebalance.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/CrushRebalancers/TestCrushAutoRebalanceNonRack.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/CrushRebalancers/TestNodeSwap.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/DelayedAutoRebalancer/TestDelayedAutoRebalance.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalance.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalancePartitionLimit.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalanceWithDisabledInstance.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingMaxPartition.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestCustomIdealState.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestSemiAutoRebalance.java
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromCurrentStates.java
helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromTargetEV.java
helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderPeriodicRefresh.java
helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableSnapshot.java
helix-core/src/test/java/org/apache/helix/integration/task/TestBatchAddJobs.java
helix-core/src/test/java/org/apache/helix/integration/task/TestDeleteWorkflow.java
helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailure.java
helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeout.java
helix-core/src/test/java/org/apache/helix/integration/task/TestNoDoubleAssign.java
helix-core/src/test/java/org/apache/helix/integration/task/TestQuotaBasedScheduling.java
helix-core/src/test/java/org/apache/helix/integration/task/TestStopWorkflow.java
helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignmentCalculator.java
helix-core/src/test/java/org/apache/helix/integration/task/TestTaskConditionalRetry.java
helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerRetryLimit.java
helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerStopResume.java
helix-core/src/test/java/org/apache/helix/integration/task/TestTaskThrottling.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestRawZkClient.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpMultiThread.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpSingleThread.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheSyncOpSingleThread.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSizeLimit.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestZkCacheAsyncOpSingleThread.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestZkCacheSyncOpSingleThread.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestZkFlapping.java
helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixAdmin.java
helix-core/src/test/java/org/apache/helix/manager/zk/client/TestHelixZkClient.java
helix-core/src/test/java/org/apache/helix/model/TestConstraint.java
helix-core/src/test/java/org/apache/helix/monitoring/TestClusterStatusMonitorLifecycle.java
helix-core/src/test/java/org/apache/helix/monitoring/TestZKPathDataDumpTask.java
helix-core/src/test/java/org/apache/helix/monitoring/mbeans/TestClusterAggregateMetrics.java
helix-core/src/test/java/org/apache/helix/store/zk/TestAutoFallbackPropertyStore.java
helix-core/src/test/java/org/apache/helix/store/zk/TestZkHelixPropertyStore.java
helix-core/src/test/java/org/apache/helix/store/zk/TestZkManagerWithAutoFallbackStore.java
helix-core/src/test/java/org/apache/helix/task/TaskSynchronizedTestBase.java
helix-core/src/test/java/org/apache/helix/task/TestAssignableInstanceManagerControllerSwitch.java
helix-core/src/test/java/org/apache/helix/task/TestGetLastScheduledTaskExecInfo.java
helix-core/src/test/java/org/apache/helix/task/TestGetSetUserContentStore.java
helix-core/src/test/java/org/apache/helix/task/TestSemiAutoStateTransition.java
helix-core/src/test/java/org/apache/helix/task/TestTaskCreateThrottling.java
helix-core/src/test/java/org/apache/helix/tools/TestClusterSetup.java
helix-core/src/test/java/org/apache/helix/tools/TestHelixAdminCli.java
helix-core/src/test/resources/TestJobFailure.json
pom.xml