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