Sniffy - chaos engineering

Simulate network issues in JVM apps

Fault tolerance testing

Discover all outgoing network connections from your server and disable them right from your browser

Sniffy will throw a java.net.ConnectException when your application tries to connect to address disallowed by Sniffy. It’s also possible to specify a fixed delay for all sent and received TCP packets.


Simulating no connectivity in unit tests

    @Rule public SniffyRule sniffyRule = new SniffyRule();

    @Test
    @DisableSockets
    public void testDisableSockets() throws IOException {
        try {
            new Socket("google.com", 22);
            fail("Sniffy should have thrown ConnectException");
        } catch (ConnectException e) {
            assertNotNull(e);
        }
    }