VMLens lets you test multi-threaded, concurrent java
Simply surround your multi-threaded, concurrent test with a loop iterating over all interleavings:
import com.vmlens.api.AllInterleavings;
public class TestNonVolatileField {
private int j = 0;
@Test
public void testUpdate() throws InterruptedException {
try(AllInterleavings allInterleavings = new AllInterleavings("testNonVolatileField")) {
while (allInterleavings.hasNext()) {
Thread first = new Thread() {
@Override
public void run() {
j++;
}
};
first.start();
j++;
first.join();
}
}
}
}
Got 10 minutes?