-
- @TestConfiguration
- static class Config
- {
- @Bean
- ChatHome[] chatHomes(
- ChatBackendProperties properties,
- ChatHomeFactory factory)
- {
- ChatHome[] chatHomes = new ChatHome[properties.getInmemory().getNumShards()];
- Arrays
- .stream(properties.getInmemory().getOwnedShards())
- .forEach(i -> chatHomes[i] = factory.createChatHome(i));
- return chatHomes;
- }
- }