java.lang.AssertionError: Encountered 20 failures; start time: 2013-03-01T14:34:16.241-06:00; failure messages: Failed to find value:4 Failed to find value:5 Failed to find value:4 Failed to find value:0 Failed to find value:1 Failed to find value:1 Failed to find value:5 Failed to find value:8 Failed to find value:8 Failed to find value:2 Failed to find value:2 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:1 Failed to find value:1 Failed to find value:1 Failed to find value:2 Failed to find value:2

Terracotta Project Issue Tracker | Scott Buchholz | 4 years ago
  1. 0

    We have noticed a periodic issues in our production environment with multiple caches where it appears that when calling getAllWithLoader() the CacheLoader implementation is not being invoked for the key (either because we know the key exists or the cache loader implementation was written to always return a value). After further investigation we believe the issue is related to attempting to retrieve an expired, but un-purged key from the cache. In net.sf.ehcache.Cache.getAllWithLoader() there is the following block of code: {code} for (Object key1 : keys) { key = key1; Element element = get(key); if (element != null) { map.put(key, element.getObjectValue()); } else if (isKeyInCache(key)) { map.put(key, null); } else { missingKeys.add(key); } } {code} We believe the issue is the call to get(key) returns null, since it is expired, however the doc for isKeyInCache(key) states: {quote} This method is not synchronized. It is possible that an element may exist in the cache and be removed before the check gets to it, or vice versa. *Since no assertions are made about the state of the Element it is possible that the Element is expired, but this method still returns true.* {quote} This results in a null entry being added to the results map for the key and the cache loader not being invoked. This is behaviorally different from getWithLoader() which does not evaluate isKeyInCache() and instead correctly calls the cache loader for an expired key, so it appears to only be an issue when attempting to load multiple keys. I have attached a sample jUnit that demonstrates the behavior we are seeing. Sample Test Output: java.lang.AssertionError: Encountered 20 failures; start time: 2013-03-01T14:34:16.241-06:00; failure messages: Failed to find value:4 Failed to find value:5 Failed to find value:4 Failed to find value:0 Failed to find value:1 Failed to find value:1 Failed to find value:5 Failed to find value:8 Failed to find value:8 Failed to find value:2 Failed to find value:2 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:1 Failed to find value:1 Failed to find value:1 Failed to find value:2 Failed to find value:2 at org.junit.Assert.fail(Assert.java:88)

    Terracotta Project Issue Tracker | 4 years ago | Scott Buchholz
    java.lang.AssertionError: Encountered 20 failures; start time: 2013-03-01T14:34:16.241-06:00; failure messages: Failed to find value:4 Failed to find value:5 Failed to find value:4 Failed to find value:0 Failed to find value:1 Failed to find value:1 Failed to find value:5 Failed to find value:8 Failed to find value:8 Failed to find value:2 Failed to find value:2 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:1 Failed to find value:1 Failed to find value:1 Failed to find value:2 Failed to find value:2
  2. 0

    We have noticed a periodic issues in our production environment with multiple caches where it appears that when calling getAllWithLoader() the CacheLoader implementation is not being invoked for the key (either because we know the key exists or the cache loader implementation was written to always return a value). After further investigation we believe the issue is related to attempting to retrieve an expired, but un-purged key from the cache. In net.sf.ehcache.Cache.getAllWithLoader() there is the following block of code: {code} for (Object key1 : keys) { key = key1; Element element = get(key); if (element != null) { map.put(key, element.getObjectValue()); } else if (isKeyInCache(key)) { map.put(key, null); } else { missingKeys.add(key); } } {code} We believe the issue is the call to get(key) returns null, since it is expired, however the doc for isKeyInCache(key) states: {quote} This method is not synchronized. It is possible that an element may exist in the cache and be removed before the check gets to it, or vice versa. *Since no assertions are made about the state of the Element it is possible that the Element is expired, but this method still returns true.* {quote} This results in a null entry being added to the results map for the key and the cache loader not being invoked. This is behaviorally different from getWithLoader() which does not evaluate isKeyInCache() and instead correctly calls the cache loader for an expired key, so it appears to only be an issue when attempting to load multiple keys. I have attached a sample jUnit that demonstrates the behavior we are seeing. Sample Test Output: java.lang.AssertionError: Encountered 20 failures; start time: 2013-03-01T14:34:16.241-06:00; failure messages: Failed to find value:4 Failed to find value:5 Failed to find value:4 Failed to find value:0 Failed to find value:1 Failed to find value:1 Failed to find value:5 Failed to find value:8 Failed to find value:8 Failed to find value:2 Failed to find value:2 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:1 Failed to find value:1 Failed to find value:1 Failed to find value:2 Failed to find value:2 at org.junit.Assert.fail(Assert.java:88)

    Terracotta Project Issue Tracker | 4 years ago | Scott Buchholz
    java.lang.AssertionError: Encountered 20 failures; start time: 2013-03-01T14:34:16.241-06:00; failure messages: Failed to find value:4 Failed to find value:5 Failed to find value:4 Failed to find value:0 Failed to find value:1 Failed to find value:1 Failed to find value:5 Failed to find value:8 Failed to find value:8 Failed to find value:2 Failed to find value:2 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:1 Failed to find value:1 Failed to find value:1 Failed to find value:2 Failed to find value:2
  3. 0

    Test failures on OSX 10.10.1 / Java 1.8.0_40-ea

    GitHub | 2 years ago | xpe
    java.lang.AssertionError: Failed to convert correctly at position: 30 result (str): "/timestampAfterFeb2036,t�WP" answer (str): "/timestampAfterFeb2036,t��" result (raw): "{ 47, 116, 105, 109, 101, 115, 116, 97, 109, 112, 65, 102, 116, 101, 114, 70, 101, 98, 50, 48, 51, 54, 0, 0, 44, 116, 0, 0, 1, -80, 87, 80, 0, 0, 0, 0 };" answer (raw): "{ 47, 116, 105, 109, 101, 115, 116, 97, 109, 112, 65, 102, 116, 101, 114, 70, 101, 98, 50, 48, 51, 54, 0, 0, 44, 116, 0, 0, 1, -80, 2, -16, 0, 0, 0, 0 };"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JAX-RS Declarative Security tests are failing

    GitHub | 2 years ago | bartoszmajsak
    java.lang.AssertionError: Basic authentication required: {realm="file"}
  6. 0

    Soften Graph Generator Tests

    GitHub | 2 years ago | spmallette
    java.lang.AssertionError: Cross community percentage should not be less than zero

  1. andyglick 7 times, last 3 months ago
  2. tfr 4 times, last 5 months ago
9 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.AssertionError

    Encountered 20 failures; start time: 2013-03-01T14:34:16.241-06:00; failure messages: Failed to find value:4 Failed to find value:5 Failed to find value:4 Failed to find value:0 Failed to find value:1 Failed to find value:1 Failed to find value:5 Failed to find value:8 Failed to find value:8 Failed to find value:2 Failed to find value:2 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:3 Failed to find value:1 Failed to find value:1 Failed to find value:1 Failed to find value:2 Failed to find value:2

    at org.junit.Assert.fail()
  2. JUnit
    Assert.fail
    1. org.junit.Assert.fail(Assert.java:88)
    1 frame