This commit is contained in:
parent
b6bc4bb12f
commit
7527d76743
@ -167,4 +167,10 @@ public interface NamingMaintainService {
|
|||||||
*/
|
*/
|
||||||
void updateService(Service service, AbstractSelector selector) throws NacosException;
|
void updateService(Service service, AbstractSelector selector) throws NacosException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shutdown the resource service.
|
||||||
|
*
|
||||||
|
* @throws NacosException exception.
|
||||||
|
*/
|
||||||
|
void shutDown() throws NacosException;
|
||||||
}
|
}
|
||||||
|
@ -173,4 +173,8 @@ public class NacosNamingMaintainService implements NamingMaintainService {
|
|||||||
serverProxy.updateService(service, selector);
|
serverProxy.updateService(service, selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void shutDown() throws NacosException {
|
||||||
|
serverProxy.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ import com.alibaba.nacos.api.selector.ExpressionSelector;
|
|||||||
import com.alibaba.nacos.api.selector.NoneSelector;
|
import com.alibaba.nacos.api.selector.NoneSelector;
|
||||||
import com.alibaba.nacos.sys.utils.ApplicationUtils;
|
import com.alibaba.nacos.sys.utils.ApplicationUtils;
|
||||||
import com.alibaba.nacos.test.BaseTest;
|
import com.alibaba.nacos.test.BaseTest;
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -163,5 +164,10 @@ public class NamingMaintainService_ITCase extends BaseTest {
|
|||||||
|
|
||||||
Assert.assertTrue(namingMaintainService.deleteService(serviceName));
|
Assert.assertTrue(namingMaintainService.deleteService(serviceName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void tearDown() throws NacosException {
|
||||||
|
namingMaintainService.shutDown();
|
||||||
|
namingService.shutDown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user