fossable / sandpolis

Ultimate virtual estate monitoring and management!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Socket timing in unit tests

cilki opened this issue · comments

In some rare cases, tests that setup a socket listener can fail due to timing issues. All unit tests that use sockets need to ensure the listener is active before making connection requests.

Example of a test that can fail due to socket timing: https://github.com/Subterranean-Security/Sandpolis/blob/bb266986bdee6ec13bfb940f0c6e88b18dace613/module/com.sandpolis.core.net/src/test/java/com/sandpolis/core/net/future/SockFutureTest.java#L74