dont print listeners by default
This commit is contained in:
parent
417ee0d439
commit
6ff7de288c
|
@ -7,6 +7,8 @@ import net.hyperic.sigar.Sigar;
|
||||||
import net.hyperic.sigar.SigarNotImplementedException;
|
import net.hyperic.sigar.SigarNotImplementedException;
|
||||||
|
|
||||||
public class TestNetStat extends SigarTestCase {
|
public class TestNetStat extends SigarTestCase {
|
||||||
|
private static boolean printListeners =
|
||||||
|
"true".equals(System.getProperty("sigar.netstat.listeners"));
|
||||||
|
|
||||||
public TestNetStat(String name) {
|
public TestNetStat(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
|
@ -22,9 +24,15 @@ public class TestNetStat extends SigarTestCase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
traceln("");
|
||||||
assertGtEqZeroTrace("Outbound", netstat.getTcpOutboundTotal());
|
assertGtEqZeroTrace("Outbound", netstat.getTcpOutboundTotal());
|
||||||
assertGtEqZeroTrace("Inbound", netstat.getTcpInboundTotal());
|
assertGtEqZeroTrace("Inbound", netstat.getTcpInboundTotal());
|
||||||
assertGtEqZeroTrace("Listen", netstat.getTcpListen());
|
assertGtEqZeroTrace("Listen", netstat.getTcpListen());
|
||||||
|
assertGtEqZeroTrace("Established", netstat.getTcpEstablished());
|
||||||
|
|
||||||
|
if (!printListeners) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int flags = NetFlags.CONN_SERVER | NetFlags.CONN_TCP;
|
int flags = NetFlags.CONN_SERVER | NetFlags.CONN_TCP;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue