Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for testComputeIfAbsent (0.07 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java

        super.setUp();
        this.cache =
            CacheBuilder.newBuilder()
                .expireAfterAccess(500000, MILLISECONDS)
                .maximumSize(count)
                .build();
      }
    
      public void testComputeIfAbsent() {
        // simultaneous insertion for same key, expect 1 winner
        doParallelCacheOp(count, n -> cache.asMap().computeIfAbsent(key, k -> "value" + n));
        assertThat(cache.size()).isEqualTo(1);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 6.4K bytes
    - Click Count (0)
Back to Top