Search in sources :

Example 6 with RMStateDelta

use of org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta in project scheduling by ow2-proactive.

the class RMInitialStateChunksTest method clientKnowsInitialState.

@Test
public void clientKnowsInitialState() {
    final RMStateDelta response = this.rmInitialState.cloneAndFilter(0);
    assertEquals(1, response.getNodeSource().size());
    assertEquals(500, response.getNodeSource().get(0).getCounter());
}
Also used : RMStateDelta(org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta) Test(org.junit.Test)

Example 7 with RMStateDelta

use of org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta in project scheduling by ow2-proactive.

the class RMInitialStateChunksTest method clientKnowsSomething.

@Test
public void clientKnowsSomething() {
    final RMStateDelta response = this.rmInitialState.cloneAndFilter(549);
    assertEquals(1, response.getNodeSource().size());
    assertEquals(49, response.getNodesEvents().size());
    assertEquals(1099, response.getLatestCounter());
}
Also used : RMStateDelta(org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta) Test(org.junit.Test)

Example 8 with RMStateDelta

use of org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta in project scheduling by ow2-proactive.

the class RMInitialStateChunksTest method clientKnowsNothing.

@Test
public void clientKnowsNothing() {
    final RMStateDelta response = this.rmInitialState.cloneAndFilter(RMInitialState.EMPTY_STATE);
    assertEquals(1, response.getNodeSource().size());
    assertEquals(49, response.getNodesEvents().size());
    assertEquals(549, response.getLatestCounter());
}
Also used : RMStateDelta(org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta) Test(org.junit.Test)

Example 9 with RMStateDelta

use of org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta in project scheduling by ow2-proactive.

the class RMInitialStateTest method testCloneAndFilter2.

@Test
public void testCloneAndFilter2() {
    final RMStateDelta rmInitialState = this.rmInitialState.cloneAndFilter(20);
    assertEquals(5, rmInitialState.getNodesEvents().size());
    assertEquals(2, rmInitialState.getNodeSource().size());
}
Also used : RMStateDelta(org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta) Test(org.junit.Test)

Example 10 with RMStateDelta

use of org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta in project scheduling by ow2-proactive.

the class RMInitialStateTest method testCloneAndFilter1.

@Test
public void testCloneAndFilter1() {
    final RMStateDelta rmInitialState = this.rmInitialState.cloneAndFilter(RMInitialState.EMPTY_STATE);
    assertEquals(5, rmInitialState.getNodesEvents().size());
    assertEquals(2, rmInitialState.getNodeSource().size());
}
Also used : RMStateDelta(org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta) Test(org.junit.Test)

Aggregations

RMStateDelta (org.ow2.proactive.resourcemanager.common.event.dto.RMStateDelta)10 Test (org.junit.Test)8