You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/02/04 05:50:01 UTC

[dubbo] branch 2.7.8.1-release updated: fix ut

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.7.8.1-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/2.7.8.1-release by this push:
     new 0098743  fix ut
0098743 is described below

commit 0098743959250e3760e74c6c840f2840bf201ac7
Author: ken.lj <ke...@gmail.com>
AuthorDate: Thu Feb 4 13:48:26 2021 +0800

    fix ut
---
 .../src/test/java/org/apache/dubbo/common/BaseServiceMetadataTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/BaseServiceMetadataTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/BaseServiceMetadataTest.java
index 62d860c..1075aec 100644
--- a/dubbo-common/src/test/java/org/apache/dubbo/common/BaseServiceMetadataTest.java
+++ b/dubbo-common/src/test/java/org/apache/dubbo/common/BaseServiceMetadataTest.java
@@ -18,6 +18,7 @@ package org.apache.dubbo.common;
 
 import org.junit.jupiter.api.Test;
 
+import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_VERSION;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 
@@ -51,7 +52,7 @@ public class BaseServiceMetadataTest {
         assertEquals(BaseServiceMetadata.groupFromServiceKey("group1/org.apache.dubbo.common.TestInterface:1.0.0"), "group1");
         assertEquals(BaseServiceMetadata.interfaceFromServiceKey("group1/org.apache.dubbo.common.TestInterface:1.0.0"), "org.apache.dubbo.common.TestInterface");
 
-        assertNull(BaseServiceMetadata.versionFromServiceKey(""));
+        assertEquals(DEFAULT_VERSION, BaseServiceMetadata.versionFromServiceKey(""));
         assertNull(BaseServiceMetadata.groupFromServiceKey(""));
         assertEquals(BaseServiceMetadata.interfaceFromServiceKey(""), "");