Search in sources :

Example 1 with UnusedTestElement

use of com.evolveum.midpoint.tools.testng.UnusedTestElement in project midpoint by Evolveum.

the class AbstractOrgClosureTest method _test400UnloadOrgStructure.

@UnusedTestElement
protected void _test400UnloadOrgStructure() throws Exception {
    OperationResult opResult = new OperationResult("===[ unloadOrgStruct ]===");
    long start = System.currentTimeMillis();
    removeOrgStructure(opResult);
    System.out.println("Removed in " + (System.currentTimeMillis() - start) + " ms");
    try (Session session = openSession()) {
        Query q = session.createNativeQuery("select count(*) from m_org_closure");
        System.out.println("OrgClosure table has " + q.list().get(0) + " rows");
    }
    logger.info("Finish.");
}
Also used : Query(org.hibernate.query.Query) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) Session(org.hibernate.Session) UnusedTestElement(com.evolveum.midpoint.tools.testng.UnusedTestElement)

Example 2 with UnusedTestElement

use of com.evolveum.midpoint.tools.testng.UnusedTestElement in project midpoint by Evolveum.

the class AbstractStoryTest method dumpThreadLocalPerformanceData.

// TODO: used on demand/temporarily? then mark with suppress warning + comment
@UnusedTestElement
protected PerformanceInformation dumpThreadLocalPerformanceData(String testName) {
    PerformanceInformation performanceInformation = getRepoPerformanceMonitor().getThreadLocalPerformanceInformation();
    dumpRepoPerformanceData("Repo operations for " + testName, performanceInformation);
    dumpCachePerformanceData(testName, CachePerformanceCollector.INSTANCE.getThreadLocalPerformanceMap());
    return performanceInformation;
}
Also used : PerformanceInformation(com.evolveum.midpoint.repo.api.perf.PerformanceInformation) UnusedTestElement(com.evolveum.midpoint.tools.testng.UnusedTestElement)

Aggregations

UnusedTestElement (com.evolveum.midpoint.tools.testng.UnusedTestElement)2 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 PerformanceInformation (com.evolveum.midpoint.repo.api.perf.PerformanceInformation)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Session (org.hibernate.Session)1 Query (org.hibernate.query.Query)1