@@ -661,7 +661,7 @@ void testSuccess() {
661661 public void registerInstance (String serviceName , String groupName , Instance instance ) {}
662662
663663 @ Override
664- public List <Instance > getAllInstances (String serviceName , String groupName ) {
664+ public List <Instance > getAllInstances (String serviceName , String groupName , boolean subscribe ) {
665665 return null ;
666666 }
667667 };
@@ -674,7 +674,7 @@ public List<Instance> getAllInstances(String serviceName, String groupName) {
674674 Assertions .fail (e );
675675 }
676676 try {
677- nacosNamingServiceWrapper .getAllInstances ("Test" , "Test" );
677+ nacosNamingServiceWrapper .getAllInstancesWithoutSubscription ("Test" , "Test" );
678678 } catch (NacosException e ) {
679679 Assertions .fail (e );
680680 }
@@ -690,7 +690,8 @@ public void registerInstance(String serviceName, String groupName, Instance inst
690690 }
691691
692692 @ Override
693- public List <Instance > getAllInstances (String serviceName , String groupName ) throws NacosException {
693+ public List <Instance > getAllInstances (String serviceName , String groupName , boolean subscribe )
694+ throws NacosException {
694695 throw new NacosException ();
695696 }
696697 };
@@ -699,7 +700,9 @@ public List<Instance> getAllInstances(String serviceName, String groupName) thro
699700 new NacosNamingServiceWrapper (new NacosConnectionManager (namingService ), 0 , 0 );
700701 Assertions .assertThrows (
701702 NacosException .class , () -> nacosNamingServiceWrapper .registerInstance ("Test" , "Test" , null ));
702- Assertions .assertThrows (NacosException .class , () -> nacosNamingServiceWrapper .getAllInstances ("Test" , "Test" ));
703+ Assertions .assertThrows (
704+ NacosException .class ,
705+ () -> nacosNamingServiceWrapper .getAllInstancesWithoutSubscription ("Test" , "Test" ));
703706 }
704707
705708 @ Test
@@ -717,7 +720,8 @@ public void registerInstance(String serviceName, String groupName, Instance inst
717720 }
718721
719722 @ Override
720- public List <Instance > getAllInstances (String serviceName , String groupName ) throws NacosException {
723+ public List <Instance > getAllInstances (String serviceName , String groupName , boolean subscribe )
724+ throws NacosException {
721725 if (count2 .incrementAndGet () < 10 ) {
722726 throw new NacosException ();
723727 }
@@ -735,9 +739,11 @@ public List<Instance> getAllInstances(String serviceName, String groupName) thro
735739 Assertions .fail (e );
736740 }
737741
738- Assertions .assertThrows (NacosException .class , () -> nacosNamingServiceWrapper .getAllInstances ("Test" , "Test" ));
742+ Assertions .assertThrows (
743+ NacosException .class ,
744+ () -> nacosNamingServiceWrapper .getAllInstancesWithoutSubscription ("Test" , "Test" ));
739745 try {
740- nacosNamingServiceWrapper .getAllInstances ("Test" , "Test" );
746+ nacosNamingServiceWrapper .getAllInstancesWithoutSubscription ("Test" , "Test" );
741747 } catch (NacosException e ) {
742748 Assertions .fail (e );
743749 }
0 commit comments