Skip to content

Instantly share code, notes, and snippets.

@polyglotpiglet
Last active November 18, 2017 11:58
Show Gist options
  • Select an option

  • Save polyglotpiglet/7bc1aa2c00ba2da04c4901c8baaab828 to your computer and use it in GitHub Desktop.

Select an option

Save polyglotpiglet/7bc1aa2c00ba2da04c4901c8baaab828 to your computer and use it in GitHub Desktop.
import org.junit.Test;
import java.util.Random;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import static org.assertj.core.api.Assertions.assertThat;
public class NoVisibilityTest {
private ExecutorService executor = Executors.newSingleThreadExecutor();
@Test
public void go() throws ExecutionException, InterruptedException {
Random random = new Random();
while (true) {
assertThat(new NoVisibility(executor, random).go())
.isEqualTo(0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment