File tree Expand file tree Collapse file tree
trpc-core/src/test/java/com/tencent/trpc/core/common/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import static org .junit .Assert .assertEquals ;
1515import static org .junit .Assert .assertFalse ;
1616import static org .junit .Assert .assertNotNull ;
17+ import static org .junit .Assert .assertSame ;
1718import static org .junit .Assert .assertTrue ;
1819
1920import com .google .common .collect .ImmutableMap ;
@@ -90,6 +91,8 @@ public void testConfig() {
9091 config .setExplicitFlushAfterFlushes (1024 );
9192 config .setCompressMinBytes (10 );
9293 config .setDefault ();
94+ ServiceConfig serviceConfig = new ServiceConfig ();
95+ config .setServiceConfig (serviceConfig );
9396 assertEquals ("127.1.1.1" , config .getIp ());
9497 assertEquals ("" , config .getName ());
9598 assertEquals (8080 , config .getPort ());
@@ -124,5 +127,6 @@ public void testConfig() {
124127 assertFalse (config .useEpoll ());
125128 assertEquals (10 , config .getCompressMinBytes ());
126129 assertTrue (config .isSetDefault ());
130+ assertSame (serviceConfig , config .getServiceConfig ());
127131 }
128132}
You can’t perform that action at this time.
0 commit comments