Fix TestCloudEventCallbackProperty by bypassing connecting to zk (#2017)
authorMolly Gao <31704180+mgao0@users.noreply.github.com>
Wed, 6 Apr 2022 17:53:22 +0000 (10:53 -0700)
committerJunkai Xue <junkai.xue@gmail.com>
Thu, 7 Apr 2022 23:26:21 +0000 (16:26 -0700)
commit7669a05ae7460bc2445e083a3e45c871e627a207
tree18ed7407d3233196f844fdeb2ea37c65ba6def95
parenta1c52ed2088f73206c855b889cc1d55460a7d07d
Fix TestCloudEventCallbackProperty by bypassing connecting to zk (#2017)

Due to logical change in ZKHelixManager constructor in a #1986, TestCloudEventCallbackProperty broke because in this test it doesn't connect to zookeeper server.
To fix this test, we separated MockCloudEventAwareHelixManager ï¼ˆpreviously called MockEventAwareZKHelixManager, nested inside TestCloudEventCallbackProperty)into a class, and include all and only the logics related to cloud events in MockCloudEventAwareHelixManager. More detailed, we mock a cloud config object retrieved from zk to bypass connection to zk.
helix-core/src/test/java/org/apache/helix/cloud/event/MockCloudEventAwareHelixManager.java [new file with mode: 0644]
helix-core/src/test/java/org/apache/helix/cloud/event/TestCloudEventCallbackProperty.java