Package org.rioproject.impl.system.measurable.memory

Examples of org.rioproject.impl.system.measurable.memory.Memory.start()


    @Test
    public void createAndVerifyMemoryClass() {
        Memory mem = new Memory(EmptyConfiguration.INSTANCE);
        SimpleThresholdListener l = new SimpleThresholdListener();
        mem.start();
        mem.checkValue();
        double utilization = mem.getUtilization();
        Assert.assertTrue("Utilization should be > 0", utilization>0);
        Assert.assertTrue(l.getType()== null);
    }
View Full Code Here


    public void createAndVerifyMemoryWithLowerThresholdBeingCrossed() {
        Memory mem = new Memory(EmptyConfiguration.INSTANCE);
        ThresholdValues tVals = new ThresholdValues(0.30, 0.90);
        mem.setThresholdValues(tVals);
        SimpleThresholdListener l = new SimpleThresholdListener();
        mem.start();
        mem.checkValue();
        double utilization = mem.getUtilization();
        Assert.assertTrue("Utilization should be > 0", utilization>0);
        Assert.assertTrue(l.getType()== null);
    }
View Full Code Here

    public void createAndVerifyMemoryWithUpperThresholdBeingCrossed() {
        Memory mem = new Memory(EmptyConfiguration.INSTANCE);
        ThresholdValues tVals = new ThresholdValues(0.00, 0.05);
        mem.setThresholdValues(tVals);
        SimpleThresholdListener l = new SimpleThresholdListener();
        mem.start();
        mem.checkValue();
        double utilization = mem.getUtilization();
        Assert.assertTrue("Utilization should be > 0", utilization>0);
        Assert.assertTrue(l.getType()== null);
    }
View Full Code Here

    @Test
    public void createAndVerifyMemoryClass() {
        Memory mem = new Memory(EmptyConfiguration.INSTANCE);
        SimpleThresholdListener l = new SimpleThresholdListener();
        mem.start();
        mem.checkValue();
        double utilization = mem.getUtilization();
        Assert.assertTrue("Utilization should be > 0", utilization>0);
        Assert.assertTrue(l.getType()== null);
    }
View Full Code Here

    public void createAndVerifyMemoryWithLowerThresholdBeingCrossed() {
        Memory mem = new Memory(EmptyConfiguration.INSTANCE);
        ThresholdValues tVals = new ThresholdValues(0.30, 0.90);
        mem.setThresholdValues(tVals);
        SimpleThresholdListener l = new SimpleThresholdListener();
        mem.start();
        mem.checkValue();
        double utilization = mem.getUtilization();
        Assert.assertTrue("Utilization should be > 0", utilization>0);
        Assert.assertTrue(l.getType()== null);
    }
View Full Code Here

    public void createAndVerifyMemoryWithUpperThresholdBeingCrossed() {
        Memory mem = new Memory(EmptyConfiguration.INSTANCE);
        ThresholdValues tVals = new ThresholdValues(0.00, 0.05);
        mem.setThresholdValues(tVals);
        SimpleThresholdListener l = new SimpleThresholdListener();
        mem.start();
        mem.checkValue();
        double utilization = mem.getUtilization();
        Assert.assertTrue("Utilization should be > 0", utilization>0);
        Assert.assertTrue(l.getType()== null);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.