Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ut unstable #2192

Merged
merged 1 commit into from
Aug 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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