lordcheng10 commented on code in PR #13971:
URL: https://github.com/apache/apisix/pull/13971#discussion_r4320563932


##########
t/discovery/nacos2.t:
##########
@@ -386,3 +386,248 @@ GET /hello
 qr/server [1-2]/
 --- error_log
 fetch_from_host: http://127.0.0.1:20998/nacos/v1/ err:all nacos services fetch 
failed
+
+
+
+=== TEST 7: keep cached nodes of a service whose refresh fails
+--- yaml_config
+apisix:
+  node_listen: 1984
+deployment:
+  role: data_plane
+  role_data_plane:
+    config_provider: yaml
+discovery:
+  nacos:
+      host:
+        - "http://127.0.0.1:20997";
+      prefix: "/nacos/v1/"
+      fetch_interval: 1
+      weight: 1
+      timeout:
+        connect: 2000
+        send: 2000
+        read: 5000
+--- apisix_yaml
+routes:
+  -
+    uri: /hello
+    upstream:
+      service_name: APISIX-NACOS
+      discovery_type: nacos
+      type: roundrobin
+  -
+    uri: /hello_test_group
+    upstream:
+      service_name: APISIX-NACOS
+      discovery_type: nacos
+      type: roundrobin
+      discovery_args:
+        group_name: test_group

Review Comment:
   Good catch, thanks — fixed in 41575dc2.
   
   The `/hello_test_group` route now carries `proxy-rewrite: uri: /hello`, 
matching the existing grouped-service tests, so the request reaches the fixture 
backend and the assertion only exercises cache retention rather than the wrong 
upstream path.
   
   I also re-checked TEST 8: it only inspects `/v1/discovery/nacos/dump` and 
never proxies through `/hello_test_group`, so it was unaffected by this issue.



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

Reply via email to