guozhangwang commented on a change in pull request #10646: URL: https://github.com/apache/kafka/pull/10646#discussion_r633852084
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateManagerImpl.java ########## @@ -128,8 +129,7 @@ public void setGlobalProcessorContext(final InternalProcessorContext globalProce } final Set<String> changelogTopics = new HashSet<>(); - for (final StateStore stateStore : globalStateStores) { - globalStoreNames.add(stateStore.name()); + for (final StateStore stateStore : topology.globalStateStores()) { Review comment: Yes, but the reason is that, in the unit test we do not really follow the trace of `stateMgr.initialize() -> store.init() -> context.registerStore() -> stateMgr.registerStore()`. That's because the `context` is a mock, which does not use the `stateMgr` at all, and hence the `stores` set is always empty. If we do want to test this call trace, then we need to make the mock context to get the actual stateMgr. -- 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: us...@infra.apache.org