Package com.sequenceiq.cloudbreak.controller.json

Examples of com.sequenceiq.cloudbreak.controller.json.HostGroupAdjustmentJson


    @Test(expected = BadRequestException.class)
    public void testUpdateHostsDoesntAcceptMultipleListingOfTheSameHostGroup() throws HttpResponseException {
        // GIVEN
        Set<HostGroupAdjustmentJson> hostGroupAdjustments = new HashSet<>();
        HostGroupAdjustmentJson hga1 = new HostGroupAdjustmentJson();
        hga1.setHostGroup("slave_1");
        hga1.setScalingAdjustment(1);
        HostGroupAdjustmentJson hga2 = new HostGroupAdjustmentJson();
        hga2.setHostGroup("slave_1");
        hga2.setScalingAdjustment(2);
        hostGroupAdjustments.add(hga1);
        hostGroupAdjustments.add(hga2);
        // WHEN
        underTest.updateHosts(stack.getId(), hostGroupAdjustments);
    }
View Full Code Here


    @Test(expected = BadRequestException.class)
    public void testUpdateHostsDoesntAcceptZeroScalingAdjustments() throws HttpResponseException {
        // GIVEN
        Set<HostGroupAdjustmentJson> hostGroupAdjustments = new HashSet<>();
        HostGroupAdjustmentJson hga1 = new HostGroupAdjustmentJson();
        hga1.setHostGroup("slave_1");
        hga1.setScalingAdjustment(0);
        HostGroupAdjustmentJson hga2 = new HostGroupAdjustmentJson();
        hga2.setHostGroup("master");
        hga2.setScalingAdjustment(0);
        hostGroupAdjustments.add(hga1);
        hostGroupAdjustments.add(hga2);
        // WHEN
        underTest.updateHosts(stack.getId(), hostGroupAdjustments);
    }
View Full Code Here

    @Test(expected = BadRequestException.class)
    public void testUpdateHostsDoesntAcceptScalingAdjustmentsWithDifferentSigns() throws HttpResponseException {
        // GIVEN
        Set<HostGroupAdjustmentJson> hostGroupAdjustments = new HashSet<>();
        HostGroupAdjustmentJson hga1 = new HostGroupAdjustmentJson();
        hga1.setHostGroup("slave_1");
        hga1.setScalingAdjustment(-2);
        HostGroupAdjustmentJson hga2 = new HostGroupAdjustmentJson();
        hga2.setHostGroup("master");
        hga2.setScalingAdjustment(3);
        hostGroupAdjustments.add(hga1);
        hostGroupAdjustments.add(hga2);
        // WHEN
        underTest.updateHosts(stack.getId(), hostGroupAdjustments);
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.controller.json.HostGroupAdjustmentJson

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.