Package com.springsource.insight.intercept.operation

Examples of com.springsource.insight.intercept.operation.Operation


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

    private Operation createOperation(String param) {
        Operation op = new Operation().type(FilesTrackerDefinitions.TYPE);

        op.put(FilesTrackerDefinitions.PATH_ATTR, param);
        return op;
    }
View Full Code Here


    //execution(* DBCursor.skip());
    @Test
    public void skip() throws Exception {
        testCursor().skip(34);
        Operation op = getLastEntered();
        assertNotNull(op);
        assertEquals("MongoDB: DBCursor.skip()", op.getLabel());
        assertEquals("34", ((OperationList) op.get("args")).get(0));
        standardAsserts(op);
    }
View Full Code Here

        assertInitialState();

        // enable query external resources creation
        registry.set(CollectionSettingNames.CS_QUERY_EXRTERNAL_RESOURCE_NAME, Boolean.TRUE);

        Operation op = createJdbcOperation("jdbc:foobar://huh:8080");
        op.type(JdbcOperationExternalResourceAnalyzer.TYPE);
        op.put("sql", "selct * from all");

        Frame frame = createJdbcFrame(op);
        Trace trace = createJdbcTrace(frame);

        assertQueryExternalResources(trace);
View Full Code Here

        assertInitialState();

        // enable query external resources creation
        registry.set(CollectionSettingNames.CS_QUERY_EXRTERNAL_RESOURCE_NAME, Boolean.TRUE);

        Operation op = createJdbcOperation("jdbc:foobar://huh:8080");
        op.type(JdbcOperationExternalResourceAnalyzer.TYPE);

        Frame frame = createJdbcFrame(op);
        Trace trace = createJdbcTrace(frame);

        registry.set(CollectionSettingNames.createApplicationCollectionSettingName(trace.getAppName()), Boolean.FALSE);
View Full Code Here

    public void testRun1() throws Exception {
        // Step 1: Execute test
        tests.test_Lookup1();

        // Step 2:  Get the Operation that was just created by our aspect
        Operation op = getLastEntered();
        assertNotNull("No Neo4J.Lookup operation data is intercepted", op);

        // Step 3:  Validate
        assertEquals("Invalid operation type", OperationCollectionTypes.LOOKUP_TYPE.type, op.getType());

        assertEquals("Invalid Label", OperationCollectionTypes.LOOKUP_TYPE.label, op.getLabel());

        assertNotNull("Parameter 'indexName' does not exists", op.get("indexName"));
        assertNotNull("Parameter 'query' does not exists", op.get("query"));
    }
View Full Code Here

    //execution(* DBCursor.limit(int));
    @Test
    public void limit() throws Exception {
        testCursor().limit(35);
        Operation op = getLastEntered();
        assertNotNull(op);
        assertEquals("MongoDB: DBCursor.limit()", op.getLabel());
        assertEquals("35", ((OperationList) op.get("args")).get(0));
        standardAsserts(op);
    }
View Full Code Here

        assertSame("QUERY ExternalResourceDescriptor parent first child", desc, firstChild);

        Frame frame = desc.getFrame();
        assertNotNull("QUERY ExternalResourceDescriptor frame", frame);

        Operation op = frame.getOperation();
        assertNotNull("QUERY ExternalResourceDescriptor frame operation", frame);

        String sql = oSql != null ? oSql : op.get("sql", String.class);
        assertEquals("QUERY ExternalResourceDescriptor label", sql, desc.getLabel());

        assertEquals("QUERY ExternalResourceDescriptor vendor", parent.getVendor(), desc.getVendor());
        assertEquals("QUERY ExternalResourceDescriptor host", parent.getHost(), desc.getHost());
        assertEquals("QUERY ExternalResourceDescriptor port", parent.getPort(), desc.getPort());
View Full Code Here

    //execution(* DBCursor.toArray());
    @Test
    public void toArray() throws Exception {
        testCursor().toArray();
        Operation op = getLastEntered();
        assertNotNull(op);
        assertEquals("MongoDB: DBCursor.toArray()", op.getLabel());
        standardAsserts(op);
    }
View Full Code Here

            } catch (IllegalArgumentException e) {
                // expected - thrown by HttpClient when null method supplied
                excValue = StringFormatterUtils.formatStackTrace(e);
            }

            Operation op = assertExecutionResult(HttpClientDefinitions.PLACEHOLDER_URI_VALUE,
                    HttpPlaceholderMethod.PLACEHOLDER,
                    HttpClientDefinitions.FAILED_CALL_STATUS_CODE,
                    true);
            assertEquals("Mismatched exception value for " + runner,
                    excValue,
                    op.get(OperationFields.EXCEPTION, String.class));
            Mockito.reset(spiedOperationCollector); // prepare for next iteration
        }
    }
View Full Code Here

    }

    @Test
    public void toArrayInt() throws Exception {
        testCursor().toArray(43);
        Operation op = getLastEntered();
        assertNotNull(op);
        assertEquals("MongoDB: DBCursor.toArray()", op.getLabel());
        assertEquals("43", ((OperationList) op.get("args")).get(0));
        standardAsserts(op);
    }
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.operation.Operation

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.