From 1d85455f155b0787efb83e2e771f22a66d7a42f6 Mon Sep 17 00:00:00 2001 From: SaaiVenkat Date: Thu, 30 Nov 2023 14:32:35 -0600 Subject: [PATCH] Fix order dependent tests in SofaRpcFallbackRegistryTest --- .../sofa/rpc/fallback/SofaRpcFallbackRegistryTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sentinel-adapter/sentinel-sofa-rpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/sofa/rpc/fallback/SofaRpcFallbackRegistryTest.java b/sentinel-adapter/sentinel-sofa-rpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/sofa/rpc/fallback/SofaRpcFallbackRegistryTest.java index 15930d10bd..9958723fe8 100644 --- a/sentinel-adapter/sentinel-sofa-rpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/sofa/rpc/fallback/SofaRpcFallbackRegistryTest.java +++ b/sentinel-adapter/sentinel-sofa-rpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/sofa/rpc/fallback/SofaRpcFallbackRegistryTest.java @@ -70,5 +70,9 @@ public SofaResponse handle(FilterInvoker invoker, SofaRequest request, BlockExce SofaResponse consumerResponse = SofaRpcFallbackRegistry.getConsumerFallback().handle(null, null, null); assertNotNull(consumerResponse); assertEquals("test consumer response", consumerResponse.getAppResponse()); + + // Reset to default provider and consumer fallback + SofaRpcFallbackRegistry.setProviderFallback(new DefaultSofaRpcFallback()); + SofaRpcFallbackRegistry.setConsumerFallback(new DefaultSofaRpcFallback()); } }