Last active
November 18, 2017 11:58
-
-
Save polyglotpiglet/7bc1aa2c00ba2da04c4901c8baaab828 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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