Skip to content

Commit

Permalink
Optimize TraceTelnetHandlerTest (apache#7843)
Browse files Browse the repository at this point in the history
  • Loading branch information
icankeep committed May 26, 2021
1 parent 79ebf89 commit 53694fe
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,15 @@ public void tearDown() {
}

@Test
public void test() throws Exception {
public void testTraceTelnetAddTracer() throws Exception {
String method = "sayHello";
String message = "org.apache.dubbo.qos.legacy.service.DemoService sayHello 1";
Class<?> type = DemoService.class;

DubboProtocol.getDubboProtocol().export(mockInvoker);
handler.telnet(mockChannel, message);

TraceFilter.addTracer(type, method, mockChannel, 100);
String key = method != null && method.length() > 0 ? type.getName() + "." + method : type.getName();
String key = type.getName() + "." + method;
Field tracers = TraceFilter.class.getDeclaredField("TRACERS");
tracers.setAccessible(true);
ConcurrentHashMap<String, Set<Channel>> map =
Expand Down

0 comments on commit 53694fe

Please sign in to comment.