mgao0 commented on a change in pull request #946: Move routing table provider
initialization
URL: https://github.com/apache/helix/pull/946#discussion_r406959499
##########
File path:
helix-core/src/test/java/org/apache/helix/integration/TestCustomizedViewAggregation.java
##########
@@ -120,6 +118,23 @@ public void beforeClass() throws Exception {
_localCustomizedView = new HashMap<>();
_routingTableProviderDataSources = new HashSet<>();
_aggregationEnabledTypes = new HashSet<>();
+
+ List<String> customizedStateTypes = Arrays
+ .asList(CustomizedStateType.TYPE_A.name(),
CustomizedStateType.TYPE_B.name(),
+ CustomizedStateType.TYPE_C.name());
+
+ CustomizedStateConfig.Builder customizedStateConfigBuilder =
+ new CustomizedStateConfig.Builder();
+
customizedStateConfigBuilder.setAggregationEnabledTypes(customizedStateTypes);
+ HelixDataAccessor accessor = _manager.getHelixDataAccessor();
+ accessor.setProperty(accessor.keyBuilder().customizedStateConfig(),
+ customizedStateConfigBuilder.build());
+ _aggregationEnabledTypes.addAll(customizedStateTypes);
+
+ Map<PropertyType, List<String>> dataSource = new HashMap<>();
+ dataSource.put(PropertyType.CUSTOMIZEDVIEW, customizedStateTypes);
+ _routingTableProvider = new RoutingTableProvider(_spectator, dataSource);
+ _routingTableProviderDataSources.addAll(customizedStateTypes);
Review comment:
Good point. I added back two tests on this.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]