Skip to content

Commit

Permalink
fix ut unstable (#2192)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrick-zhu authored Aug 6, 2018
1 parent 69311ab commit 7884aec
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.alibaba.dubbo.config.api.Greeting;
import com.alibaba.dubbo.config.support.Parameter;
import junit.framework.TestCase;
import org.hamcrest.Matchers;
import org.junit.Test;

import java.lang.annotation.ElementType;
Expand All @@ -32,6 +33,8 @@
import java.util.Map;
import java.util.Properties;

import static org.junit.Assert.assertThat;

public class AbstractConfigTest {

@Test
Expand Down Expand Up @@ -267,8 +270,8 @@ public void appendAnnotation() throws Exception {
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 {
Expand Down

0 comments on commit 7884aec

Please sign in to comment.