This is an automated email from the ASF dual-hosted git repository. wangxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push: new ad126d5 fix unit test failure (#2097) ad126d5 is described below commit ad126d53bb220dc8c46fbf40cf763afa65c5145b Author: Ian Luo <ian....@gmail.com> AuthorDate: Wed Jul 18 17:17:40 2018 +0800 fix unit test failure (#2097) --- .../test/java/org/apache/dubbo/config/AbstractConfigTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java index 60b33df..ac231cb 100644 --- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java +++ b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java @@ -16,11 +16,12 @@ */ package org.apache.dubbo.config; +import junit.framework.TestCase; import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.utils.ConfigUtils; import org.apache.dubbo.config.api.Greeting; import org.apache.dubbo.config.support.Parameter; -import junit.framework.TestCase; +import org.hamcrest.Matchers; import org.junit.Test; import java.lang.annotation.ElementType; @@ -32,6 +33,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; +import static org.junit.Assert.assertThat; + public class AbstractConfigTest { @Test @@ -267,8 +270,8 @@ public class AbstractConfigTest { TestCase.assertEquals(2, annotationConfig.getParameters().size()); TestCase.assertEquals("v1", annotationConfig.getParameters().get("k1")); TestCase.assertEquals("v2", annotationConfig.getParameters().get("k2")); - TestCase.assertEquals("<dubbo:annotation filter=\"f1, f2\" listener=\"l1, l2\" />", - annotationConfig.toString()); + assertThat(annotationConfig.toString(), Matchers.containsString("filter=\"f1, f2\" ")); + assertThat(annotationConfig.toString(), Matchers.containsString("listener=\"l1, l2\" ")); } private static class PropertiesConfig extends AbstractConfig {