possible for subkeys/values not to exist
This commit is contained in:
parent
29d57da8a9
commit
9b4dd7b263
|
@ -65,11 +65,14 @@ public class TestRegistryKey extends SigarTestCase {
|
||||||
} catch (Exception e) { /*not installed - ok*/ }
|
} catch (Exception e) { /*not installed - ok*/ }
|
||||||
if (msmq != null) {
|
if (msmq != null) {
|
||||||
traceln("MSMQ...");
|
traceln("MSMQ...");
|
||||||
assertTrue(msmq.getSubKeyNames().length > 0);
|
if (msmq.getSubKeyNames().length > 0) {
|
||||||
|
try {
|
||||||
String build = msmq.getStringValue("CurrentBuild");
|
String build = msmq.getStringValue("CurrentBuild");
|
||||||
assertLengthTrace("CurrentBuild", build);
|
assertLengthTrace("CurrentBuild", build);
|
||||||
int id = msmq.getIntValue("SeqID");
|
int id = msmq.getIntValue("SeqID");
|
||||||
assertGtZeroTrace("SeqID", id);
|
assertGtZeroTrace("SeqID", id);
|
||||||
|
} catch (Exception e) {}
|
||||||
|
}
|
||||||
msmq.close();
|
msmq.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,8 +82,10 @@ public class TestRegistryKey extends SigarTestCase {
|
||||||
} catch (Exception e) { /*not installed - ok*/ }
|
} catch (Exception e) { /*not installed - ok*/ }
|
||||||
if (sql != null) {
|
if (sql != null) {
|
||||||
traceln("MsSQL...");
|
traceln("MsSQL...");
|
||||||
|
try {
|
||||||
String edition = sql.getStringValue("Edition");
|
String edition = sql.getStringValue("Edition");
|
||||||
assertLengthTrace("Edition", edition);
|
assertLengthTrace("Edition", edition);
|
||||||
|
} catch (Exception e) {}
|
||||||
sql.close();
|
sql.close();
|
||||||
}
|
}
|
||||||
ms.close();
|
ms.close();
|
||||||
|
|
Loading…
Reference in New Issue