modules/h2/src/test/java/org/gridgain/internal/h2/test/store/TestConcurrent.java
/**
     * Test what happens on concurrent write. Concurrent write may corrupt the
     * map, so that keys and values may become null.
     */
Test what happens on concurrent write. Concurrent write may corrupt the
map, so that keys and values may become null.
Test what happens on concurrent write . Concurrent write may corrupt the map so that keys and values may become null .
private void testConcurrentWrite() throws InterruptedException {
        final AtomicInteger detected = new AtomicInteger();
        final AtomicInteger notDetected = new AtomicInteger();
        for (int i = 0; i < 10; i++) {
            testConcurrentWrite(detected, notDetected);
        }
        assertTrue(notDetected.get() * 10 <= detected.get());
    }
private void testConcurrentWrite ( ) throws InterruptedException { final AtomicInteger detected = new AtomicInteger ( ) ; final AtomicInteger notDetected = new AtomicInteger ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { testConcurrentWrite ( detected , notDetected ) ; } assertTrue ( notDetected . get ( ) * 10 <= detected . get ( ) ) ; }
Test what happens on concurrent write.
Test what happens on concurrent write .
// in most cases, it should be detected