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("");
assertGtEqZeroTrace("Outbound", netstat.getTcpOutboundTotal());
assertGtEqZeroTrace("Inbound", netstat.getTcpInboundTotal());
assertGtEqZeroTrace("Listen", netstat.getTcpListen());
assertGtEqZeroTrace("Established", netstat.getTcpEstablished());
int[] states = netstat.getTcpStates();
for (int i=0; i<NetFlags.TCP_UNKNOWN; i++) {
assertGtEqZeroTrace(NetConnection.getStateString(i), states[i]);
}
if (!printListeners) {
return;