Package com.dianping.cat.consumer.cross.CrossAnalyzer

Examples of com.dianping.cat.consumer.cross.CrossAnalyzer.CrossInfo


    analyzer.setIpConvertManager(new IpConvertManager());
    analyzer.setCrossAppSwitch(new CrossAppSwitch().setTurnOn(true));

    DefaultTransaction t = new DefaultTransaction("Other", "method1", null);
    MessageTree tree = buildMockMessageTree();
    CrossInfo info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(true, info == null);
  }
View Full Code Here


    analyzer.setIpConvertManager(new IpConvertManager());
    analyzer.setCrossAppSwitch(new CrossAppSwitch().setTurnOn(true));

    DefaultTransaction t = new DefaultTransaction("Call", "method1", null);
    MessageTree tree = buildMockMessageTree();
    CrossInfo info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
    Assert.assertEquals(info.getRemoteAddress(), "Unknown");

    Message message = new DefaultEvent("PigeonCall.server", "10.1.1.1", null);
    Message messageApp = new DefaultEvent("PigeonCall.app", "myDomain", null);
    t.addChild(message);
    t.addChild(messageApp);

    info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
    Assert.assertEquals(info.getRemoteAddress(), "10.1.1.1");
    Assert.assertEquals(info.getDetailType(), "PigeonCall");
    Assert.assertEquals(info.getRemoteRole(), "Pigeon.Server");
    Assert.assertEquals(info.getApp(), "myDomain");
  }
View Full Code Here

    analyzer.setIpConvertManager(new IpConvertManager());
    analyzer.setCrossAppSwitch(new CrossAppSwitch().setTurnOn(true));

    DefaultTransaction t = new DefaultTransaction("Service", "method1", null);
    MessageTree tree = buildMockMessageTree();
    CrossInfo info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
    Assert.assertEquals(info.getRemoteAddress(), "192.168.7.70");

    Message message = new DefaultEvent("PigeonService.client", "192.168.7.71", null);
    Message messageApp = new DefaultEvent("PigeonService.app", "myDomain", null);
    t.addChild(message);
    t.addChild(messageApp);

    info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
    Assert.assertEquals(info.getRemoteAddress(), "192.168.7.71");
    Assert.assertEquals(info.getDetailType(), "PigeonService");
    Assert.assertEquals(info.getRemoteRole(), "Pigeon.Client");
    Assert.assertEquals(info.getApp(), "myDomain");
  }
View Full Code Here

    analyzer.setIpConvertManager(new IpConvertManager());
    analyzer.setCrossAppSwitch(new CrossAppSwitch().setTurnOn(true));

    DefaultTransaction t = new DefaultTransaction("Service", "method1", null);
    MessageTree tree = buildMockMessageTree();
    CrossInfo info = analyzer.parseCorssTransaction(t, tree);

    Message message = new DefaultEvent("PigeonService.client", "192.168.7.71:29987", null);
    Message messageApp = new DefaultEvent("PigeonService.app", "myDomain", null);
    t.addChild(message);
    t.addChild(messageApp);

    info = analyzer.parseCorssTransaction(t, tree);

    Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
    Assert.assertEquals(info.getRemoteAddress(), "192.168.7.71");
    Assert.assertEquals(info.getDetailType(), "PigeonService");
    Assert.assertEquals(info.getRemoteRole(), "Pigeon.Client");
    Assert.assertEquals(info.getApp(), "myDomain");
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.cross.CrossAnalyzer.CrossInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.