use of org.ovirt.engine.core.common.businessentities.FencingPolicy in project ovirt-engine by oVirt.
the class HostFenceActionExecutorTest method setup.
@Before
public void setup() {
when(dbFacade.getFenceAgentDao()).thenReturn(fenceAgentDao);
when(fencedHost.getId()).thenReturn(FENCECD_HOST_ID);
executor = spy(new HostFenceActionExecutor(fencedHost, new FencingPolicy()));
doReturn(dbFacade).when(executor).getDbFacade();
doReturn(agentExecutor1).doReturn(agentExecutor2).when(executor).createFenceActionExecutor(any());
}
use of org.ovirt.engine.core.common.businessentities.FencingPolicy in project ovirt-engine by oVirt.
the class HostFenceActionExecutorTest method testConcurrentAgentsFenceActionExecutorUsage.
/**
* Tests {@code ConcurrentAgentsFenceActionExecutor} creation for concurrent fence agents
*/
@Test
public void testConcurrentAgentsFenceActionExecutorUsage() {
HostFenceActionExecutor executor = new HostFenceActionExecutor(fencedHost, new FencingPolicy());
assertTrue(executor.createFenceActionExecutor(createConcurrentAgentsList(2, 1)) instanceof ConcurrentAgentsFenceActionExecutor);
}
use of org.ovirt.engine.core.common.businessentities.FencingPolicy in project ovirt-engine by oVirt.
the class SingleAgentFenceActionExecutorTest method setup.
@Before
public void setup() {
executor = spy(new SingleAgentFenceActionExecutor(fencedHost, fenceAgent, new FencingPolicy()));
doReturn(fenceAgentExecutor).when(executor).createAgentExecutor();
doReturn(0).when(executor).getSleepBeforeFirstAttempt();
doReturn(0).when(executor).getUnknownResultLimit();
doNothing().when(executor).auditVerifyStatusRetryLimitExceeded(any());
doReturn("host1").when(fencedHost).getHostName();
}
Aggregations