public void testExperimentSystemInformation() throws Exception {
IUniqueID uid = UniqueIDGenerator.createUniqueID();
Serializable expid = getDataStorage().setExperimentID(uid);
long mid = 987987;
String version = "AlphaBetaGamma123";
JavaInfo ji1 = new JavaInfo();
getDataStorage().writeExperimentSystemInformation(uid, mid, version, ji1);
SystemInformation si =
getDataStorage().getExperimentSystemInformation(expid);
// go through the attributes of the SystemInformation items:
assertEquals(mid, si.getMachineId());
assertEquals(version, si.getJamesVersion());
JavaInfo ji2 = si.getJavaInfo();
assertEquals(ji1.getName(), ji2.getName());
assertEquals(ji1.getVersion(), ji2.getVersion());
assertEquals(ji1.getVendor(), ji2.getVendor());
assertEquals(ji1.getInstDir(), ji2.getInstDir());
assertEquals(ji1.getClassFormatVersion(), ji2.getClassFormatVersion());
assertEquals(ji1.getClassPath(), ji2.getClassPath());
assertEquals(ji1.getExtensionDir(), ji2.getExtensionDir());
assertEquals(ji1.getSessionStarted(), ji2.getSessionStarted());
assertEquals(ji1.getUpTime(), ji2.getUpTime());
assertEquals(ji1.getOs(), ji2.getOs());
assertEquals(ji1.getOsVersion(), ji2.getOsVersion());
assertEquals(ji1.getOsArch(), ji2.getOsArch());
assertEquals(ji1.getCpus(), ji2.getCpus());
assertEquals(ji1.getTotalMemory(), ji2.getTotalMemory());
assertEquals(ji1.getFreeMemory(), ji2.getFreeMemory());
assertEquals(ji1.getMaxMemory(), ji2.getMaxMemory());
assertEquals(ji1.getThreads(), ji2.getThreads());
assertEquals(ji1.getUserName(), ji2.getUserName());
assertEquals(ji1.getUserHome(), ji2.getUserHome());
assertEquals(ji1.getUserWorkingDir(), ji2.getUserWorkingDir());
// now check what happens, if one of the parameters reference null:
expid =
getDataStorage().setExperimentID(
uid = UniqueIDGenerator.createUniqueID());