check all states

This commit is contained in:
Doug MacEachern 2006-07-10 21:29:51 +00:00
parent 42e0842c54
commit b039f75177
1 changed files with 4 additions and 2 deletions

View File

@ -27,8 +27,10 @@ public class TestNetStat extends SigarTestCase {
traceln(""); traceln("");
assertGtEqZeroTrace("Outbound", netstat.getTcpOutboundTotal()); assertGtEqZeroTrace("Outbound", netstat.getTcpOutboundTotal());
assertGtEqZeroTrace("Inbound", netstat.getTcpInboundTotal()); assertGtEqZeroTrace("Inbound", netstat.getTcpInboundTotal());
assertGtEqZeroTrace("Listen", netstat.getTcpListen()); int[] states = netstat.getTcpStates();
assertGtEqZeroTrace("Established", netstat.getTcpEstablished()); for (int i=0; i<NetFlags.TCP_UNKNOWN; i++) {
assertGtEqZeroTrace(NetConnection.getStateString(i), states[i]);
}
if (!printListeners) { if (!printListeners) {
return; return;