Package com.springsource.insight.intercept.operation

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


        RedisMap<String, String> map = new DummyRedisMapImpl<String, String>();
        map.remove(key);

        standardAsserts(method);
        Operation op = standardAsserts(method);
        mapKeyAsserts(op, method, key);
    }
View Full Code Here


    public OperationCollectionAspectSupport getAspect() {
        return RedisMapOperationCollectionAspect.aspectOf();
    }

    private Operation standardAsserts(String method) {
        Operation op = getLastEntered();
        assertEquals("RedisMap: ?." + method + "()", op.getLabel());
        assertEquals(OperationType.valueOf("redis-map"), op.getType());
        return op;
    }
View Full Code Here

        super();
    }

    @Override
    protected Operation assertFileTrackingOperation(Closeable instance, String filePath, String opcode, String mode) throws IOException {
        Operation op = super.assertFileTrackingOperation(instance, filePath, opcode, mode);
        String expected = FileOpenTrackerAspectSupport.createOperationLabel(opcode, mode, filePath);
        assertEquals("Mismatched operation label", expected, op.getLabel());
        return op;
    }
View Full Code Here

    @Test
    public void testLocateExternalResourceNameWhenDisabled() {
        assertInitialState();

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

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

        Collection<ExternalResourceDescriptor> resources = locateExternalResourceName(trace);
View Full Code Here

            assertEquals("Bad response code", HttpServletResponse.SC_OK, responseCode);
        } finally {
            conn.disconnect();
        }

        Operation op = assertSocketOperation(SocketDefinitions.CONNECT_ACTION, TEST_HOST, TEST_PORT);
        assertEquals("Mismatched method", METHOD, op.get("method", String.class));

        URL url = conn.getURL();
        assertEquals("Mismatched URL", url.toExternalForm(), op.get(OperationFields.URI, String.class));

        runExternalResourceAnalyzer(op, ExternalResourceType.WEB_SERVER, TEST_HOST, TEST_PORT);
    }
View Full Code Here

        RemoteInvocation resultValue = (RemoteInvocation) value;
        assertEquals("Mismatched result method", invocation.getMethodName(), resultValue.getMethodName());
        assertArrayEquals("Mismatched result signature", invocation.getParameterTypes(), resultValue.getParameterTypes());
        assertArrayEquals("Mismatched result arguments", invocation.getArguments(), resultValue.getArguments());

        Operation op = assertRemotingOperation(config);
        assertEquals("Mismatched request method", executor.getMethod(), op.get("method", String.class));

        ExternalResourceDescriptor desc = assertExternalResource(op);
        assertNotNull("No external resource generated", desc);
    }
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);

        Collection<ExternalResourceDescriptor> resources = locateExternalResourceName(trace);
View Full Code Here

        analyzer = new TestJDBCURIAnalyzer(JdbcDriverExternalResourceAnalyzer.TYPE);

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

        Operation op = createJdbcOperation("jdbc:foobar://huh:8080");
        op.label("test-label");
        op.type(JdbcDriverExternalResourceAnalyzer.TYPE);

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

        assertQueryExternalResources(trace, op.getLabel());
    }
View Full Code Here

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

        return descriptor;
    }

    private Trace createValidTrace(String param) {
        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        Operation op = createOperation(param);

        builder.enter(op);

        Frame frame = builder.exit();
        return Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);
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.