Search in sources :

Example 1 with InitialisableCellInfo

use of dmg.cells.nucleus.InitialisableCellInfo in project dcache by dCache.

the class CellInfoMsgHandlerTests method testReceivedCellInfo.

@Test
public void testReceivedCellInfo() {
    CellInfo[] info = new CellInfo[1];
    String version = "version";
    String release = "release";
    String cellName = "cell-1";
    String cellType = "cell-1-type";
    String cellClass = "cell-1-class";
    String domainName = "domain-1";
    Date creationTime = new Date();
    String privateInfo = "cell-1-private";
    String shortInfo = "cell-1-short";
    int eventQueueSize = 3;
    int threadCount = 5;
    int state = 2;
    CellVersion cellVersion = new CellVersion(version, release);
    info[0] = new InitialisableCellInfo(cellName, cellType, cellClass, cellVersion, domainName, creationTime, privateInfo, shortInfo, eventQueueSize, threadCount, state);
    info[0].setCellVersion(new CellVersion(version, release));
    _handler.process(info, 10);
    Queue<StateUpdate> updates = _sum.getQueue();
    assertEquals("checking StateUpdateManager's queue size", 1, updates.size());
    assertCellInfo(updates.poll(), info[0]);
}
Also used : InitialisableCellInfo(dmg.cells.nucleus.InitialisableCellInfo) CellInfo(dmg.cells.nucleus.CellInfo) StateUpdate(org.dcache.services.info.base.StateUpdate) CellVersion(dmg.cells.nucleus.CellVersion) Date(java.util.Date) InitialisableCellInfo(dmg.cells.nucleus.InitialisableCellInfo) Test(org.junit.Test)

Aggregations

CellInfo (dmg.cells.nucleus.CellInfo)1 CellVersion (dmg.cells.nucleus.CellVersion)1 InitialisableCellInfo (dmg.cells.nucleus.InitialisableCellInfo)1 Date (java.util.Date)1 StateUpdate (org.dcache.services.info.base.StateUpdate)1 Test (org.junit.Test)1