contrueCT commented on code in PR #7635:
URL: https://github.com/apache/incubator-seata/pull/7635#discussion_r2442461905


##########
discovery/seata-discovery-etcd3/src/test/java/org/apache/seata/discovery/registry/etcd3/EtcdRegistryServiceImplTest.java:
##########
@@ -118,8 +141,8 @@ public void testSubscribe() throws Exception {
         registryService.register(inetSocketAddress);
         // 2.subscribe
         EtcdListener etcdListener = new EtcdListener();
-        registryService.subscribe(CLUSTER_NAME, etcdListener);
-        // 3.delete instance,see if the listener can be notified
+        registryService.subscribe(DEFAULT_TX_GROUP, etcdListener);

Review Comment:
   Yes! The subscribe() and lookup() methods expect a transaction service 
group, not an etcd cluster name.
   The original code had mismatched key paths:
   
   - Registration: registry-seata-<DEFAULT_TX_GROUP>/...
   - Subscription: registry-seata-<CLUSTER_NAME>/...
   
   Even though both values were "default", using DEFAULT_TX_GROUP is 
semantically correct and matches how Seata actually works - clients look up 
services by transaction group.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to