use of org.apache.servicecomb.registry.version.VersionRule in project java-chassis by ServiceComb.
the class LocalServiceRegistryClientImpl method getMicroserviceId.
@Override
public String getMicroserviceId(String appId, String microserviceName, String strVersionRule, String environment) {
VersionRule versionRule = VersionRuleUtils.getOrCreate(strVersionRule);
Microservice latest = findLatest(appId, microserviceName, versionRule);
return latest != null ? latest.getServiceId() : null;
}
use of org.apache.servicecomb.registry.version.VersionRule in project java-chassis by ServiceComb.
the class TestCompatiblePathVersionMapper method createVersionRule_32767.
@Test
public void createVersionRule_32767() {
VersionRule versionRule = mapper.getOrCreate("v32767");
Assert.assertEquals("32767.0.0.0+", versionRule.getVersionRule());
}
use of org.apache.servicecomb.registry.version.VersionRule in project java-chassis by ServiceComb.
the class TestCompatiblePathVersionMapper method getOrCreate.
@Test
public void getOrCreate() {
VersionRule versionRule = mapper.getOrCreate("v1");
Assert.assertEquals("1.0.0.0-2.0.0.0", versionRule.getVersionRule());
}
Aggregations