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