com.pszymczyk.consul.junit.ConsulResource Java Examples

The following examples show how to use com.pszymczyk.consul.junit.ConsulResource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConsulRegistrationTest.java    From grpc-spring-boot-starter with Apache License 2.0 5 votes vote down vote up
@ClassRule
public static final ConsulResource consul(){
    int port = SocketUtils.findAvailableTcpPort();
    ConsulResource consulResource = new ConsulResource(port);
    System.setProperty("spring.cloud.consul.port",String.valueOf(port));
    return consulResource;
}