Package com.springsource.insight.intercept.trace

Examples of com.springsource.insight.intercept.trace.Frame


        assertEquals("Mismatched incoming value", Boolean.FALSE, Boolean.valueOf(externalResourceDescriptor.isIncoming()));
    }

    @Test
    public void test_ExtractMeaningfulNames_ParserReturnsOne() throws Exception {
        Frame frame = mock(Frame.class);
        String testUri = "jdbc:mysql://chef.metadyne.com:3000/adk?user=username&password=test";
        List<ExternalResourceDescriptor> result = dbAnalyzer.extractMeaningfulNames(frame, testUri);

        assertEquals(1, result.size());
View Full Code Here


        assertEquals(Boolean.FALSE, Boolean.valueOf(res.isIncoming()));
    }

    @Test
    public void test_ExtractMeaningfulNames_ParserReturnsTwo() throws Exception {
        Frame frame = mock(Frame.class);
        String testUri = // invalid port for the first address
                "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.184.138)(PORT = boat)) " +
                        "(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.184.139)(PORT = 1521)))";
        List<ExternalResourceDescriptor> result = dbAnalyzer.extractMeaningfulNames(frame, testUri);
View Full Code Here

        assertEquals(Boolean.FALSE, Boolean.valueOf(res.isIncoming()));
    }

    @Test
    public void test_ExtractMeaningfulNames_NoParserRecognized() throws Exception {
        Frame frame = mock(Frame.class);
        String testUri = "jdbc:mydb:scheme://server-address:8080";
        List<ExternalResourceDescriptor> result = dbAnalyzer.extractMeaningfulNames(frame, testUri);

        assertEquals(1, result.size());
View Full Code Here

    @Test
    public void testWithoutRemoteFrame() throws Exception {
        Operation op = new Operation();
        op.type(analyzer.getOperationType());

        Frame frame = new SimpleFrame(FrameId.valueOf("0"),
                null,
                op,
                TimeRange.milliTimeRange(0, 1),
                Collections.<Frame>emptyList());
View Full Code Here

    @Test
    public void testWithRemoteFrame() throws Exception {
        Operation op = new Operation();
        op.type(analyzer.getOperationType());

        Frame remoteFrame = new SimpleFrame(FrameId.valueOf("1"),
                null,
                new Operation().type(GemFireDefenitions.TYPE_REMOTE.getType()),
                TimeRange.milliTimeRange(0, 1),
                Collections.<Frame>emptyList());

        List<Frame> frames = Collections.singletonList(remoteFrame);

        Frame frame = new SimpleFrame(FrameId.valueOf("0"),
                null,
                op,
                TimeRange.milliTimeRange(0, 1),
                frames);
View Full Code Here

        builder.exit();
        builder.enter(new Operation().type(OperationType.METHOD));
        builder.enter(op1);
        builder.exit();
        builder.exit();
        Frame frame = builder.exit();
        Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);

        List<ExternalResourceDescriptor> externalResourceDescriptors =
                (List<ExternalResourceDescriptor>) analyzer.locateExternalResourceName(trace);
        assertEquals("Mismatched number of descriptors", 2, externalResourceDescriptors.size());
View Full Code Here

        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        Operation op = createOperation(host);

        builder.enter(op);

        Frame frame = builder.exit();
        return Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);
    }
View Full Code Here

        Operation op = new Operation();
        op.type(RedisExternalResourceAnalyzer.TYPE);
        op.put("host", "localhost");
        op.put("port", 6379);
        op.put("dbName", "dbName");
        Frame frame = new SimpleFrame(FrameId.valueOf("0"),
                null,
                op,
                TimeRange.milliTimeRange(0, 1),
                Collections.<Frame>emptyList());
View Full Code Here

        builder.exit();
        builder.enter(dummyOp);
        builder.enter(op1);
        builder.exit();
        builder.exit();
        Frame frame = builder.exit();
        Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);

        List<ExternalResourceDescriptor> externalResourceDescriptors =
                (List<ExternalResourceDescriptor>) analyzer.locateExternalResourceName(trace);
View Full Code Here

        builder.exit();
        builder.enter(dummyOp);
        builder.enter(op1);
        builder.exit();
        builder.exit();
        Frame frame = builder.exit();
        Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);

        List<ExternalResourceDescriptor> externalResourceDescriptors =
                (List<ExternalResourceDescriptor>) analyzer.locateExternalResourceName(trace);
        assertEquals("Mismatched number of resources", 2, externalResourceDescriptors.size());
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.trace.Frame

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.